- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
COMPILING AND RUNNING A JAVA PROGRAM Now we are ready to interpret (or “execute” as the term used in other programming languages). On a DOS pane call the interpreter (called java) i.e. C:\CS115\MyPrograms\ java MyFirstProgram Notes: java is the command for the interpreter. Your bytecodes file name is used without any extension. The output of the program will appear on the DOS window(pane). We could, however, get errors during execution, called: “RUNTIME ERRORS”. 精品文档 COMPILING AND RUNNING A JAVA PROGRAM Runtime Errors These are errors that take place during the time the program runs (these errors can not be caught by the compiler). Quite often they are referred to as “exceptions” Usually the result of programmer’s mistakes. They are reported by Java’ s runtime environment called JVM (Java Virtual Machine). Need to go back to the source code file and correct them, then re compile and try to interpret again. The interpreter will give you messages (usually cryptic) regarding the runtime errors. Sometimes we can make sense out of the message, but other times we have to kind of guess. 精品文档 COMPILING AND RUNNING A JAVA PROGRAM If there are no compiler or runtime errors, it is possible to get another category or errors called “LOGICAL ERRORS” (in spite of the fact that your program was inetrpreted) It is possible that you are not getting any errors but your program does not give you the correct result. This is due to your logical errors when you wrote the code: i.e. Suppose that you meant to add but instead you multiplied two numbers. 精品文档 STRUCTURE OF A JAVA PROGRAM Your java source code should have the following sections: Import statements (not always needed) The class name “Global” variables declared (not always needed). Also called instance variables. Methods inside the class One of those methods must be the main method Inside the method we have “local” variables declared and the source code for the method. Note: Don’t worry about the terms: import statements,
您可能关注的文档
- Game Playing课件.ppt
- Gaming Overview课件.ppt
- GC1R1两次鸦片战争华南师大附中 廖耀良课件.ppt
- GEN0190n.ppt课件.ppt
- Genetic Algorithms课件.ppt
- Genetics and insurance in the UK课件.ppt
- Geneva, 13-16 July 2009课件.ppt
- Geneva, 20-21 July 2009课件.ppt
- Geocoding & Data Collection with GPS课件.ppt
- GeoScienceWorld出版社7家地球科学领域的顶尖协会共同课件.ppt
- How to Prepare Listening课件.ppt
- How to Train Knowledge Vector课件.ppt
- HOW TO WORK FOR BABY BOOMERS课件.ppt
- HR·人力成本系列三十七课件.ppt
- HTML (HyperText Markup Language)课件.ppt
- HTML 透过一系列之标签 (tags) 去描述如何在网页中显示各课件.ppt
- HTTP Caching & Cache-Bustingfor Content Publishers课件.ppt
- Human anatomy课件.ppt
- Human Perception课件.ppt
- Human Resource Managing课件.ppt
最近下载
- 新沪科版八年级上册物理全册教学课件(2024年秋季新版教材).pptx
- 小学英语动词大全200个.pdf VIP
- 北京外国语大学校级科研项目管理办法-国际中国文化研究院.doc VIP
- 第二批跨境电子商务零售进口商品清单(第二批).pdf VIP
- MAPP 5019 美国药品过量灌装指导原则.pdf VIP
- 纯电动汽车整车控制器(VCU)策略PPT.pptx
- 石剪布属性测试36题标准版(女版).docx VIP
- 2025-2026 学年第一学期二年级上册语文教学计划.docx VIP
- 2020年 春风 800MT 中文原版MT800CF800-5CF800-5A.pdf
- 汽车科目一考试地方题库.pdf VIP
文档评论(0)