Home » JAVA Programming » Object & Classes » Question
  1. What is the output of this program?

    public class Result
    {
    public static void main(String args[])
    {
    Object o = new Object();
    System.out.print(o.getClass());
    }
    }
    1. class java.lang.Object
    2. Object
    3. Compilation Error
    4. class Object
    5. None of these
Correct Option: A

class java.lang.Object



Your comments will be displayed only after manual approval.