Java OCA OCP Practice Question 551

Question

Which of the following are true?

Choose all that apply

public class Main { 
     public static void main(String[] args) { 
         Main bun = new Main(); 
     } 
} 
  • A. Main is a class.
  • B. bun is a class.
  • C. main is a class.
  • D. Main is a reference to an object.
  • E. bun is a reference to an object.
  • F. main is a reference to an object.
  • G. None of the above.


A, E.

Note

Main is a class, which can be seen from the declaration: public class Main.

bun is a reference to an object. main() is a method.




PreviousNext

Related