MCQOPTIONS
Bookmark
Saved Bookmarks
→
Java Programming
→
Exceptions
→
What will ordinal() method provide?..
1.
What will ordinal() method provide?
A.
1
B.
0
C.
3
D.
2
E.
-1
Answer» C. 3
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What is the output of this program?<br><pre class="prettyprint lang-c"><br> class Average {<br> public static void main(String args[])<br> {<br> double number[] = {5.5, 10.1, 11, 12.8, 56.9, 2.5};<br> double res;<br> res = 0;<br> for (int i = 0; i < 6; ++i) <br> {<br> res = res + number[i];<br> }<br> System.out.print(res/6);<br> <br> } <br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">public class increment {<br> public static void main(String args[]) {<br> int a = 5;<br> System.out.print(++a * 6);<br> }<br>}</pre>
What is the output of this program?<br><pre class="prettyprint lang-c"><br> class area {<br> public static void main(String args[]) <br> { <br> double r, pi, a;<br> r = 6.8;<br> pi = 3.14;<br> a = pi * r * r;<br> System.out.println(a);<br> } <br> }<br></pre>
What will be the output of these statement?<br><pre class="prettyprint lang-c"><br>class output {<br> public static void main(String args[]) <br> {<br> double p, q, r;<br> p = 3.0/0;<br> q = 0/4.0;<br> r = 0/0.0;<br> <br> System.out.println(p);<br> System.out.println(q);<br> System.out.println(r);<br> } <br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c"><br>class output {<br> public static void main(String args[]) <br> {<br> boolean var11 = true;<br> boolean var12 = false;<br> if (var12)<br> {<br> System.out.println(var12);<br> }<br> else<br> {<br> System.out.println(var11);<br> }<br> } <br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c"><br> class output {<br> public static void main(String args[]) <br> {<br> char a = 'A';<br> a++;<br> System.out.print((int)a);<br> } <br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c"><br> class array_output {<br> public static void main(String args[]) <br> { <br> char array_variable [] = new char[10];<br> for (int i = 0; i < 10; ++i) {<br> array_variable[i] = 'j';<br> System.out.print(array_variable[i] + "" );<br> i++;<br> }<br> } <br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c"><br> class output {<br> public static void main(String args[]) <br> {<br> char var11 = 'A';<br> char var12 = 'a';<br> System.out.println((int)var11 + " " + (int)var12);<br> } <br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c"><br> class booloperators {<br> public static void main(String args[]) <br> {<br> boolean var11 = true;<br> boolean var12 = false;<br> System.out.println((var11 & var12));<br> } <br> }<br></pre>
What is the output of below code snippet?<br><pre class="prettyprint lang-c"><br>enum Enums<br>{<br> D, E, F;<br> <br> private Enums()<br> {<br> System.out.println(20);<br> }<br>}<br> <br>public class MainClass<br>{<br> public static void main(String[] args)<br> {<br> Enum en = Enums.E;<br> }<br>}<br></pre>
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply