MCQOPTIONS
Bookmark
Saved Bookmarks
→
Java Programming
→
Exceptions
→
The ………………………. loop is especiall..
1.
The ………………………. loop is especially useful when you process a menu selection.
A.
while
B.
do-while
C.
for
D.
switch
Answer» C. for
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
Which three piece of codes are equivalent to line 3?
What will be the output of the program?
What will be the output of the program? public class CommandArgsThree { public static void main(String [] args) { String [][] argCopy = new String[2][2]; int x; argCopy[0] = args; x = argCopy[0].length; for (int y = 0; y < x; y++) { System.out.print(" " + argCopy[0][y]); } } } and the command-line invocation is> java CommandArgsThree 1 2 3
public class F0091 { public void main( String[] args ) { System.out.println( "Hello" + args[0] ); } } What will be the output of the program, if this code is executed with the command line:> java F0091 world
What will be the output of the program? public class CommandArgs { public static void main(String [] args) { String s1 = args[1]; String s2 = args[2]; String s3 = args[3]; String s4 = args[4]; System.out.print(" args[2] = " + s2); } } and the command-line invocation is > java CommandArgs 1 2 3 4
What will be the output of the program? public class CommandArgsTwo { public static void main(String [] argh) { int x; x = argh.length; for (int y = 1; y <= x; y++) { System.out.print(" " + argh[y]); } } } and the command-line invocation is > java CommandArgsTwo 1 2 3
What will be the output of the program? public class X { public static void main(String [] args) { String names [] = new String[5]; for (int x=0; x < args.length; x++) names[x] = args[x]; System.out.println(names[2]); } } and the command line invocation is> java X a b
Java SE 15 version released on?
Java Source Code is compiled into ______________.
Which three are valid declarations of a char?1. char c1 = 064770;2. char c2 = 'face';3. char c3 = 0xbeef;4. char c4 = \u0022;5. char c5 = '\iface';6. char c6 = '\uface';
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply