![](https://cos-cdn.shuashuati.com/pipixue-wap/2020-1230-1107-56/ti_inject-812ce.png)
阅读下面程序,写出程序运行结果。 public class Class3302 { static public void main(String args[]) { int firstArray[]={1,2,3,4}; int secondArray[]={5,6,7,8,9,10}; int myArray[]; myArray=firstArray; System.out.println("First Array:"); for(int index=0;index 打印出所有的“水仙花数”。所谓“水仙花数”是指一个三位数,其各位数字的立方和等于该数本身。例如:153是一个“水仙花数”,因为153=13+53+33。 完成下面的程序,利用break 语句和带标号的break 语句分别退出一重循环和二重循环。 For (i=0;i<10; i++) { Int j=i*10 While (j<100){ If (j==10) Break; J=j+5; } } Exer4_3.java import java.applet.Applet; import java.awt.*; public class Exer4_3 extends Applet { String str="您好!"; char ch[]={'H','e','l','l','o'}; byte byt[]={97,98,99,100,101,102}; public void paint(Graphics g) { g.drawBytes(byt,0,5,50,50); g.drawChars(ch,0,3,50,70); g.drawString(str,50,90); } } 设a=6,b= --4, 计算表达式的值: --a% ++b (--a) < 10 ? a: b) 以下程序的输出结果是什么? Public class test1 { Public static void main (string args[]){ Int y,x=1,total=0; While (x<=10){ Y=x*x; System.out.println(y); Total+=y; ++x; } System.out.println(“total is ”+total); } } 以下程序的输出结果是什么? Public class test1 { Public static void main (string args[]){ Int y,x=1,total=0; While (x<=10){ Y=x*x; System.out.println(y); Total+=y; ++x; } System.out.println(“total is ”+total); } } 以下程序的运行结果是什么? Public class test2{ Public static void main (string args[]){ Int count=1; While (count<=10) { System.out.println(count%2 ==1?” * * * * ”:”++++++++”); ++count; } } } public class Class1 { publicstatic void main(String args[]) { intn=6,sum=0; for(intk=1;k<=n;k++) { if(n%k==0) sum+=k; } System.out.println(sum); } } 运行结果为: 指出下列程序运行的结果 public class Example{ String str=new String("good"); char[] ch = {'a','b','c'}; public static void main(String args[]){ Example ex=new Example(); ex.change(ex.str,ex.ch); System.out.print(ex.str+" and "); Sytem.out.print(ex.ch); } public void change(String str,char ch[]){ str="test ok"; ch[0]='g'; } } 下列语句段输出结果是: String str1= ”java”,str2=”java”; if(str1= =str2) System.out.println(“ 相等 ”); else System.out.println(“ 不相等 ”); 运行结果为: