139k views
3 votes
Suppose TestSimpleCircle and SimpleCircle in Listing 9.1 are in two separate files named TestSimpleCircle.java and SimpleCircle.java, respectively. What is the outcome of compiling TestsimpleCircle.java and then SimpleCircle.java?

1 Answer

0 votes

Answer:

Both will compile without any error

Step-by-step explanation:

Since there was nothing to note we assume that they have no errors in them, we compile each java file by typing javac "name of file.java", javac TestsimpleCircle.java in the case of TestsimpleCircle file, and later go on to type java TestsimpleCircle to see the output. Java files can be compiled either in the console (as done above) or in the development environment like Netbeans where you click the run button and it compiles and run the program for you.

User TheIrishGuy
by
4.6k points