What Will Be The Output Of The Following Java Codep Pre #598
What will be the output of the following Java code?</p> <pre><code class="language-java"> class Clock { public static void main(String[] args) { Clock time = new Clock(); System.out.println("" + time.getClass()); Integer i = new Integer(5); System.out.println("" + i.getClass()); } } </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 Types of Classes (Using Java) - Object Class - Quiz No.1.
What will be the output of the following Java code?
class Clock { public static void main(String[] args) { Clock time = new Clock(); System.out.println("" + time.getClass()); Integer i = new Integer(5); System.out.println("" + i.getClass()); } }
class Clock class java.lang.Integer
class Clock class java.lang.Datatype
class time class java.io.Integer
class Clock class java.io.Integer