• 2022-06-19 问题

    下列程序的输出结果是( ) class StringDemo{ public static void main(String[] args){ String s1 = “a”; String s2 = “b”; show(s1,s2); System.out.println(s1+s2); } public static void show(String s1,String s2){ s1 = s1 +“q”; s2 = s2 + s1; } } A: a B: aq C: aqbaq D: aqaq

    下列程序的输出结果是( ) class StringDemo{ public static void main(String[] args){ String s1 = “a”; String s2 = “b”; show(s1,s2); System.out.println(s1+s2); } public static void show(String s1,String s2){ s1 = s1 +“q”; s2 = s2 + s1; } } A: a B: aq C: aqbaq D: aqaq

  • 2022-06-19 问题

    【单选题】下列选项中,( )是程序正确的输出结果。[br][/br]class StringDemo{[br][/br] public static void main(String[] args){ [br][/br] String s1 = "a"; [br][/br] String s2 = "b"; [br][/br] show(s1,s2); [br][/br] System.out.println(s1+s2); [br][/br] } [br][/br] public static void show(String s1,String s2){[br][/br] s1 = s1 +"q"; [br][/br] s2 = s2 + s1; [br][/br] } [br][/br]} A: a B: aq C: aqbaq D: aqaq

    【单选题】下列选项中,( )是程序正确的输出结果。[br][/br]class StringDemo{[br][/br] public static void main(String[] args){ [br][/br] String s1 = "a"; [br][/br] String s2 = "b"; [br][/br] show(s1,s2); [br][/br] System.out.println(s1+s2); [br][/br] } [br][/br] public static void show(String s1,String s2){[br][/br] s1 = s1 +"q"; [br][/br] s2 = s2 + s1; [br][/br] } [br][/br]} A: a B: aq C: aqbaq D: aqaq

  • 1