Anddy 发表于 2013-1-27 04:50:15

debug_print statement

今天做了一个SSD 3 的quiz ---debug DNASequence.java 。just spend awhole morning!真可谓万事开头难!

    虽然才初步了解了eclipse强大的Debugger 的功能,那个Step Into功能(执行程序的下一步)可让你看到程序执行的每一个步骤,现在就不用担心程序是如何运行的问题,多态的问题也可以进一步的了解Step Over的功能(执行源程序中中断的下一条语句)。
有点不爽就是,Step Into以后,就不能回到前一步。

回头看SSD3 教材,Multiple quiz 1 有如下一道题:


As an aid in debugging a program in Java, print statements may be used to display which of the following types of information?


he names of methods being called
The values of the parameters of a method
The values of the instance variables of a class




(a) I, II, and III
(b) I and III only
(c) I and II only
(d) II and III only

蒙对了,但是对Print Statement 不是很了解,网上的资料也很少。个人理解:打印状态

[*]The called methods
[*]The value of parameters
[*]The value of loop control variables
[*]The value of local variables
[*]The value of instance variables

   要是能打印每一个步骤的详细执行,那就牛逼,一看打印,就知道什么地方有Debug。

慢慢理解!what is PrintStatement~~how to use It?
页: [1]
查看完整版本: debug_print statement