题目:阅读下面的代码: 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. 以上都不对
B. Tom,Jerry, Tuffy
C. Tom,Jerry,Donald
D. Tom,Jerry
答案:评论后可见此内容