A good answer might be:
|
Testing ClassRemember that the Java interpreter starts your program by looking for the main() method. Since this is a static method, it is in your code before anything starts running. It is convenient to have a separate testing class that serves no other purpose than to contain the main() method. No testing class objects will be constructed when the program runs. (However, main() will usually construct objects of other classes as it runs.) You should name the file HelloTester.java. When you compile the file, the compiler will output two separate files of bytecodes:
When you run the program you should type: The Java interpreter will find the main() method in the HelloTester class and start it running.java HelloTester |
QUESTION 10:When the Java interpreter needs to use a definition of the HelloObject class, where will it be found? Click Here after you have answered the question |