- 1、本文档共61页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Java语言程序设计 参考资料2
Chapter 2 - Introduction to Java Applications 2.1 Introduction In this chapter Introduce examples to illustrate features of Java Two program styles - applications and applets 2.2 A Simple Program: Printing a Line of Text Application Program that executes using the java interpreter Sample program Show program, then analyze each line Welcome1.javaProgram Output 1 // Fig. 2.1: Welcome1.java 2 // A first program in Java. 3 4 public class Welcome1 { 5 6 // main method begins execution of Java application 7 public static void main( String args[] ) 8 { 9 System.out.println( Welcome to Java Programming! ); 10 11 } // end method main 12 13 } // end class Welcome1 2.2 A Simple Program: Printing a Line of Text Comments start with: // Comments ignored during program execution Document and describe code Provides code readability Multiple line comments: /* ... */ /* This is a multiple line comment. It can be split over many lines */ Another line of comments Note: line numbers not part of program, added for reference 2.2 A Simple Program: Printing a Line of Text Blank line Makes program more readable Blank lines, spaces, and tabs are white-space characters Ignored by compiler Begins class definition for class Welcome1 Every Java program has at least one user-defined class Keyword: words reserved for use by Java class keyword followed by class name Naming classes: capitalize every word SampleClassName 2.2 A Simple Program: Printing a Line of Text Name of class called identifier Series of characters consisting of letters, digits, underscores ( _ ) and dollar signs ( $ ) Does not begin with a digit, has no spaces Examples: Welcome1, $value, _value, button7 7button is invalid Java is case sensitive (capitalization matters) a1 and A1 are different For chapters 2 to 7, use public keyword Certain details not important now Mimic certain features, discussions later 2.2 A Simple Program: Printing a L
您可能关注的文档
- Introduction of TESCO Own-label Vegetable--TESCO自有品牌蔬菜简介.ppt
- Introduction to Computing 计算概论.ppt
- Introduction to College English主讲教师_张家瑞.ppt
- introduction to six sigma 課件.ppt
- investment_-1课堂.ppt
- In_The_Earthquakes_的证.pptx
- IP001项目管理与软件项目管理.pptx
- IP102-07软件项目进度计划.ppt
- IP104-13软件项目集成计划.pptx
- iPhone+平台游戏中国市场研究+v01.pptx
- 湖南省湘潭市第二中学2024-2025学年高三下学期第一次模拟考试政治试题(含解析).pdf
- 内蒙古自治区赤峰市多校2024-2025学年七年级下学期5月阶段测试英语试卷(含答案).pdf
- 第9章平面直角坐标系 单元测试卷(含解析)2025-2026学年七年级下册数学人教版.pdf
- 第11章不等式与不等式组 能力提升卷(含解析) 2025-2026学年七年级下册数学人教版.pdf
- 2025届上海市静安区高三下学期二模英语试题(含答案).pdf
- 江苏省海门中学2024-2025学年高一下学期限时检测四英语试题.pdf
- 202504高一地理选修期中(定稿).pdf
- 湖北省十堰市2024-2025学年高一下学期期末调研考试政治试卷(含答案).pdf
- 浙江省舟山市2024-2025学年高二下学期6月期末检测政治试卷(含答案).pdf
- 第7章相交线与平行线 单元测试卷(含解析) 2025-2026学年七年级下册数学人教版.pdf
最近下载
- 必威体育精装版《教育学原理》期末考试试卷A及答案上课讲义.doc VIP
- Unit 1 Topic 1 基础提升过关练习答案仁爱版英语八年级上册.docx VIP
- 2025年新《矿产资源法》变化解读.pptx
- 高一期末自我评价600字.docx VIP
- 《书法鉴赏》教案 第1章 认识书法艺术.docx VIP
- 版医用物理学课后习题答案.pdf VIP
- 制作“火箭”(说课稿)-2023-2024学年科学六年级下册人教鄂教版.docx VIP
- DB62T4638-2022 绿色食品露地娃娃菜生产技术规程.pdf VIP
- 2024年四川省绵阳市中考化学试题卷(含答案解析).docx
- 广东省2024年普通专插本《政治理论》考试真题及参考答案.doc VIP
文档评论(0)