</p> 16. }
) G) ~# R9 ~6 [5 _8 U7 P8 K 17. public static void swap(String name0,String name1) {
3 c# m) g y7 I7 C5 K T' M. S1 P 18. String temp;
! k* N9 j' P2 t 19. temp=name0;
5 v4 b+ D4 a! O) G6 H 20. name0=name1;
2 i4 a, ?( r. J3 L ~: W3 Y. L0 x 21. name1=temp;1 i) U3 ? ~9 l
22. }
. c! n% }0 A7 E 23. } // end of Class Note1 w6 A. K- N2 A7 W
a. Killer,Miller followed by Killer,Miller
- G5 Y% N) J& X2 X/ X b. Miller,Killer followed by Killer,Miller
) r9 [1 L7 t: n- X, S c. Killer,Miller followed by Miller,Killer# J# |% z% Z2 e1 n
d. Miller,Killer followed by Miller,Killer
" i0 T! P# [. j% h% [; v Q9.What is the output of the following program?* u7 B. w) A2 W3 y' ?
1. public class Q11 {
* d$ N7 H! g* B/ i6 y" [8 _ 2. static String str1 = “main method with String[] args”;
! x( P$ g5 N6 j5 H( } 3. s tatic String str2 = “main method with int[] args”;/ ^2 t/ s7 `+ L: z
5. public static void main(String[] args) {
( G0 d* X Z* ^" ^7 ~6 N# t 6. System.out.println(str1);
8 u) V$ L3 E$ `: @+ m 7. }2 Y3 q6 g% R- h: q+ _9 ~4 u
10. public static void main(int[] args) {) f" b, @0 \; `' e3 s/ G
11. System.out.println(str2);
! e' g+ l6 P9 l$ o. Y0 c 12. }4 I! d5 Q1 q+ J7 M* Y
13. }
! ?3 u. Q7 f3 K- P7 _ i! ` a. Duplicate method main(), compilation error at line 5.6 P% M! y7 @; R! x
b. Duplicate method main(), compilation error at line 10.( h9 v% P: [9 i% n
c. Prints “main method with String[] args”.! h7 `+ r- i: H* D8 F( C+ B6 @
d. Prints “main method with int[] args”.
5 x( j' j7 H* }& K G g+ A1 l4 A 7. b' K9 s5 C7 w; H% s
8. c
3 f* Y. r7 v; x 9. c |