How do I trace methods calls in Java?
问题 Consider the two simple Java classes below: First Example class Computer { Computer() { System.out.println("Constructor of Computer class."); } void On() { System.out.println("PC turning on..."); } void working() { System.out.println("PC working..."); } void Off() { System.out.println("PC shuting down..."); } public static void main(String[] args) { Computer my = new Computer(); Laptop your = new Laptop(); my.On(); my.working(); your.On(); your.working(); my.Off(); your.Off(); } } Second