I am enclosing the code Dan's mock exam 2 , ques3
The answer given is d .
I want to ask Dan something
class A is declared as public and assuming that both class A and B are in the same file, How would you save the file ? is it A.java or B.java.
If you save it as B.java, then there is a compiler error even before processing of code starts. However, by seeing the code , it seems as though the main method is in the B class.
I guess thats a typo. I am a bit confused