MCQOPTIONS
Bookmark
Saved Bookmarks
→
Java Programming
→
Exceptions
→
What is the value of n after this line of code h..
1.
What is the value of n after this line of code has been executed?
A.
1
B.
2
C.
3
D.
4
E.
5
Answer» F.
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What is the output of this program?<br><pre class="prettyprint lang-c">class N <br> {<br> int p;<br> double q;<br> }<br> class M extends N<br> {<br> int r;<br> }<br> public class result <br> {<br> public static void main(String args[]) <br> {<br> N p = new N();<br> M q = new M();<br> Class object;<br> object = q.getClass();<br> System.out.print(object.isInstance(p));<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">class N <br> {<br> int p;<br> double q;<br> }<br> class M extends N<br> {<br> int r;<br> }<br> public class Result <br> {<br> public static void main(String args[]) <br> {<br> N p = new N();<br> M q = new M();<br> Class object;<br> object = q.getClass();<br> System.out.print(q.equals(p));<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">class N<br> {<br> int p;<br> double q;<br> }<br> class M extends N<br> {<br> int r;<br> }<br> public class Result <br> {<br> public static void main(String args[]) <br> {<br> N p = new N();<br> M q = new M();<br> Class object;<br> object = q.getClass();<br> System.out.print(object.getSuperclass());<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">public class isNaN_Example <br> {<br> public static void main(String args[]) <br> {<br> Double num = new Double(1 / 0.); <br> boolean p = num.isNaN();<br> System.out.print(p);<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">public class isinfinite_Example<br> {<br> public static void main(String args[]) <br> {<br> Double num = new Double(1 / 0.); <br> boolean p = num.isInfinite();<br> System.out.print(p);<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c"><br>class box_Shape <br> {<br> int width;<br> int height;<br> int length;<br> } <br> public class mainclass <br> {<br> public static void main(String args[]) <br> { <br> box_Shape obj = new box_Shape();<br> System.out.println(obj);<br> } <br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c"><br>class box_Shape <br> {<br> int width;<br> int height;<br> int length;<br> } <br> public class mainclass <br> {<br> public static void main(String args[]) <br> { <br> box_Shape obj1 = new box_Shape();<br> box_Shape obj2 = new box_Shape();<br> obj1.height = 3;<br> obj1.length = 4;<br> obj1.width = 6;<br> obj2 = obj1;<br> System.out.println(obj2.height);<br> } <br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">class N<br> {<br> int p;<br> double q;<br> }<br> class M extends N <br> {<br> int r;<br> }<br> public class Result <br> {<br> public static void main(String args[]) <br> {<br> N p = new N();<br> M q = new M();<br> Class object;<br> object = q.getClass();<br> System.out.print(object.isLocalClass());<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">class N <br> {<br> int p;<br> double q;<br> }<br> class M extends N<br> {<br> int r;<br> }<br> public class Output <br> {<br> public static void main(String args[]) <br> {<br> N p = new N();<br> M q = new M();<br> Class object;<br> object = p.getClass();<br> System.out.print(object.getName());<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">class N<br> {<br> int p;<br> double q;<br> }<br> class M extends N <br> {<br> int r;<br> }<br> public class Result <br> {<br> public static void main(String args[]) <br> {<br> N p = new N();<br> M q = new M();<br> Class object;<br> object = q.getClass();<br> System.out.print(object.getSuperclass());<br> }<br> }<br></pre>
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply