Examine the content of App.java:
Which is true?
Examine the content of App.java:
Which is true?
The App class file should be stored in the p1 directory because it belongs to the p1 package. Similarly, the Test class file belongs to the p1.p2 package, so it should be stored in a subdirectory p2 within the p1 directory. Thus, the correct assertion is that the App.class file is stored within the p1 folder, and the Test.class file is stored within the p2 sub-folder of p1.
I really didn't understand the purpose of the question, the same question which of the alternatives is true, but the letters A, C and D are correct and I still tested it just in case. Answer B is the only one that is wrong because to use the app class inside Test you need to do the import because they are in different packages... Now if the question refers to which answer fits the context of the utterance, it would mark answer C. NOTE: Following this logic, for the sake of conscience, I would mark the one that has more to do with the context, because it would be "the most correct".
D is also wrong, in this context.
Why is A not considered true?
A is incorrect because source code is .java, not .class.
A should be correct.
What for would you wanted import p1.App that contains main method into Test class? question doesn't any sense to me.