-
What is the output of this program?
public class Result
{
public static void main(String args[])
{
Object object = new Object();
System.out.print(object.getclass());
}
}
-
- Compilation error
- class object
- class java.lang.Object
- Runtime error
- None of these
Correct Option: A
Result.java:6: error: cannot find symbol
System.out.print(object.getclass());
^
symbol: method getclass()
location: variable object of type Object
1 error
output: Compilation error