题目
[主观题]
【分录题】以下程序段的输出结果为 (注意空格) public class MyClass { int a[] = { 1, 2, 3, 4, 5 }; void out() { for (int j = 0; j < a.length; j++) System.out.print(a[j] + ""); } public static void main(String[] args) { MyClass my = new MyClass(); my.out(); } }
答案
一笔会计分录主要包括三个要素,即会计科目、记账符号和金额;不能将两项或两项以上不同类型的经济业务合在一起编制复合会计分录
更多“【分录题】以下程序段的输出结果为 (注意空格) public class MyClass { int a[] = { 1, 2, 3, 4, 5 }; void out() { for (int j …”相关的问题
第1题
【分录题】以下程序段的输出结果为 (注意空格) public class Father { String name, address, tel; int age; public Father(String name, int age) { this.name = name; this.age = age; } void out() { System.out.print("姓名:" + name); System.out.print(" 年龄:" + age); } void outOther() { System.out.print(" 家庭住址:" + address); System.out.print(" 电话:" + tel); } public static void main(String args[]) { Son son = new Son("Tom", 15); son.address = "金水区"; son.school = "九中"; son.tel = "661
点击查看答案
第2题
执行完下面的程序段后,输出结果是(注意,此题结果不用$隔开) for(int i=0;i<10;i++){ if(i%2==0) continue; if(i%7==0) break; System.out.print(i); }
点击查看答案
第3题
以下程序段的输出结果为()。 for(i=4;i>1;i--) for(j=1;j<i;j++) putchar('#');
点击查看答案
第4题
【分录题】写出下面程序的运行结果(注意大小写、空格和英文符号) public class ABC { public static void main(String args[]) { AB s = new AB("Hello!", "I love JAVA."); System.out.println(s.toString()); } } class AB { String s1; String s2; public AB(String str1, String str2) { s1 = str1; s2 = str2; } public String toString() { return s1 + s2; } }
点击查看答案
第5题
以下程序段的输出结果为() int a=0,b=0,c=0; if(a==b+c) printf(“*** ”); else printf(“$$$ ”);
A.有语法错误,不能通过编译
B.可以通过编译但不能通过连接
C.输出***
D.输出$$$
点击查看答案
第6题
以下程序段的输出结果为()。 int x=1; for (x=2;x<=10;x++ ) ; System.out.print(x);
点击查看答案
第7题
有以下程序段: m=5 sum=0 while m<10: sum=sum+m m=m+1 print(sum) 程序运行后输出的结果为: ()
点击查看答案
第8题
以下程序段执行时输入:java Test 则输出结果为()。 class Test { public static void main(String args[ ]) { System.out.println(args[0]); } }
A.无任何输出
B.产生数组访问越界异常
C.输出 0
D.输出 Test
点击查看答案
第9题
第22小题(C++填空题(4分) 分析以下程序段: int i,n=0; for(i=0;i<10;i++) { n++; if(i>5) break; } 执行完该程序段后,i的值为____;n的值为____ 多个空格间用空格隔开,答案示例:x x
点击查看答案