- 1、本文档共84页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* Class 名: ComputeArea. 常量: PI and MAX_VALUE * 适当的缩进和空白 缩进风格 每个内层的组件或语句应该比外层缩进两格. 空行 使用空行把代码分段,以使程序更容易阅读. * 块的对齐方式 次行风格和尾行风格 ? * 编程错误 语法错误 编译过程中出现的错误 运行错误 引起程序非正常中断的错误(错误的输入类型,0做除数等) 逻辑错误 没有按照期望的要求执行 * 语法错误 public class ShowSyntaxErrors { public static void main(String[] args) { i = 30; System.out.println(i + 4); } } * 运行时错误 public class ShowRuntimeErrors { public static void main(String[] args) { int i = 1 / 0; } } * 逻辑错误 public ShowLogicError() { public static void main(String[] args) { int number1=2; int number2=3; number2+=number1+number2; System.out.println(number2=+number2); } } * Debugging Logic errors are called bugs. The process of finding and correcting errors is called debugging. A common approach to debugging is to use a combination of methods to narrow down to the part of the program where the bug is located. You can hand-trace the program (i.e., catch errors by reading the program), or you can insert print statements in order to show the values of the variables or the execution flow of the program. This approach might work for a short, simple program. But for a large, complex program, the most effective approach for debugging is to use a debugger utility. * Debugger Debugger is a program that facilitates debugging. You can use a debugger to Execute a single statement at a time. Trace into or stepping over a method. Set breakpoints. Display variables. Display call stack. Modify variables. * Debugging in JBuilder The debugger utility is integrated in JBuilder. You can pinpoint bugs in your program with the help of the JBuilder debugger without leaving the IDE. The JBuilder debugger enables you to set breakpoints and execute programs line by line. As your program executes, you can watch the values stored in variables, observe which methods are being called, and know what events have occurred in the program. JBuilder Optional * Setting Breakpoints A breakpoint is a stop sign placed on
您可能关注的文档
- 合唱排练技巧与指挥设计技巧.ppt
- 矿产资源微生物技术-6煤炭微生物脱硫技术技巧.ppt
- 第二十二章第二节+人的性状和遗传上课用选编.ppt
- 第二十四章动物生态选编.ppt
- 第二十章-动物进化选编.ppt
- 1.生物化学讲解.ppt
- 矿大(北京)化工热力学06第六章(3-28)技巧.ppt
- 第二章:操作系统选编.ppt
- 交通安全日宣传技巧.ppt
- 矿大(北京)化工热力学06第六章技巧.ppt
- 2025AACR十大热门靶点推荐和解读报告52页.docx
- 财务部管理报表.xlsx
- 高中物理新人教版选修3-1课件第二章恒定电流第7节闭合电路欧姆定律.ppt
- 第三单元知识梳理(课件)-三年级语文下册单元复习(部编版).pptx
- 俄罗斯知识点训练课件-七年级地理下学期人教版(2024).pptx
- 课外古诗词诵读龟虽寿-八年级语文上学期课内课件(统编版).pptx
- 高三语文二轮复习课件第七部分实用类文本阅读7.2.1.ppt
- 高考物理人教版一轮复习课件第4章第3讲圆周运动.ppt
- 高考英语一轮复习课件53Lifeinthefuture.ppt
- 2025-2030衣柜行业风险投资发展分析及投资融资策略研究报告.docx
文档评论(0)