In order for a source code file, containing the public class Test, to successfully compile, which of the following must be true?

  1. It must have a package statement

  2. It must be named Test.java

  3. It must import java.lang

  4. It must declare a public class named Test


Correct Option: B

Find more quizzes: