阅读下面的程序public class Example{ public static void main(String[] args) { String[] strs = { "Tom", "Jerry", "Donald" }; // foreach循环遍历数组 for (String str : strs) { str = "Tuffy"; } System.out.println(strs[0] + "," + strs[1] + "," + strs[2]); }}程序的运行结果是( ) A: Tom,Jerry,Donald B: Tuffy,Jerry,Donald C: Tuffy, Tuffy, Tuffy D: 发生异常,输出异常信息
阅读下面的程序public class Example{ public static void main(String[] args) { String[] strs = { "Tom", "Jerry", "Donald" }; // foreach循环遍历数组 for (String str : strs) { str = "Tuffy"; } System.out.println(strs[0] + "," + strs[1] + "," + strs[2]); }}程序的运行结果是( ) A: Tom,Jerry,Donald B: Tuffy,Jerry,Donald C: Tuffy, Tuffy, Tuffy D: 发生异常,输出异常信息
阅读下面的程序public class Example{public static void main(String[] args) {String[] strs = { "Tom", "Jerry", "Donald" };// foreach循环遍历数组for (String str : strs) {str = "Tuffy";}System.out.println(strs[0] + "," + strs[1] + "," + strs[2]);}}下列选项中,程序的运行结果是( ) A: Tom,Jerry,Donald B: Tuffy,Jerry,Donald C: Tuffy,Tuffy,Tuffy D: 发生异常,输出异常信息
阅读下面的程序public class Example{public static void main(String[] args) {String[] strs = { "Tom", "Jerry", "Donald" };// foreach循环遍历数组for (String str : strs) {str = "Tuffy";}System.out.println(strs[0] + "," + strs[1] + "," + strs[2]);}}下列选项中,程序的运行结果是( ) A: Tom,Jerry,Donald B: Tuffy,Jerry,Donald C: Tuffy,Tuffy,Tuffy D: 发生异常,输出异常信息
阅读下面的程序public class Example{ public static void main(String[] args) { String[] strs = { "Tom", "Jerry", "Donald" }; // foreach循环遍历数组 for (String str : strs) { str = "Tuffy"; } System.out.println(strs[0] + "," + strs[1] + "," + strs[2]); }}下列选项中,程序的运行结果是( ) A: A、Tom,Jerry,Donald B: B、Tuffy,Jerry,Donald C: C、Tuffy,Tuffy,Tuffy D: D、发生异常,输出异常信息
阅读下面的程序public class Example{ public static void main(String[] args) { String[] strs = { "Tom", "Jerry", "Donald" }; // foreach循环遍历数组 for (String str : strs) { str = "Tuffy"; } System.out.println(strs[0] + "," + strs[1] + "," + strs[2]); }}下列选项中,程序的运行结果是( ) A: A、Tom,Jerry,Donald B: B、Tuffy,Jerry,Donald C: C、Tuffy,Tuffy,Tuffy D: D、发生异常,输出异常信息
阅读下面的代码:publicclassExample{publicstaticvoidmain(String[]args){String[]strs={"Tom","Jerry","Donald"};//foreach循环遍历数组for(Stringstr:strs){str="Tuffy";}System.out.println(strs[0]+","+strs[1]+","+strs[2]);}}程序的运行结果是() A: Tom,Jerry B: Tom,Jerry,Tuffy C: Tom,Jerry,Donald D: 以上都不对
阅读下面的代码:publicclassExample{publicstaticvoidmain(String[]args){String[]strs={"Tom","Jerry","Donald"};//foreach循环遍历数组for(Stringstr:strs){str="Tuffy";}System.out.println(strs[0]+","+strs[1]+","+strs[2]);}}程序的运行结果是() A: Tom,Jerry B: Tom,Jerry,Tuffy C: Tom,Jerry,Donald D: 以上都不对
public class Example{ public static void main(String[] args) { String[] strs = { "Tom", "Jerry", "Donald" }; // foreach循环遍历数组 for (String str : strs) { str = "Tuffy"; } System.out.println(strs[0] + "," + strs[1] + "," + strs[2]); } } 下列选项中,程序的运行结果是
public class Example{ public static void main(String[] args) { String[] strs = { "Tom", "Jerry", "Donald" }; // foreach循环遍历数组 for (String str : strs) { str = "Tuffy"; } System.out.println(strs[0] + "," + strs[1] + "," + strs[2]); } } 下列选项中,程序的运行结果是