分析下面的C#代码,该程序的运行结果是()。classExample{staticvoidMain(stringQargs){Console.
分析下面的C#代码,该程序的运行结果是()。classExample{staticvoidMain(stringQ
args){Console.WriteLine("/Looklikeacomment");}}
A.LookslikeA.comment
B./LookslikeA.comment
C.没有输出任何内容
D.编译错误
分析下面的C#代码,该程序的运行结果是()。classExample{staticvoidMain(stringQ
args){Console.WriteLine("/Looklikeacomment");}}
A.LookslikeA.comment
B./LookslikeA.comment
C.没有输出任何内容
D.编译错误
A.无内容输出
B.代码编译失败
C.打印输出null
D.打印输出s=null
args){(newExample).myMethod(;}voidmyMethod(){intxy;x=5;y=3;Console.Write("(*+x+","+y+'));switchCoords(x.y);Console.Write("("+x+"+y+")");}voidswitchCoords(intX,inty){inttemp;temp=x;y=temp;Console.Write("+x+"+y+")");}}
A.打印输出(5,3)(5,5)(5,3)
B.打印输出(5,3)(3,5)(3,5)
C.打印输出(5,3)(3,5)(5,3)
s2;staticvoidMain(stringDargs){s2=s1+s2;Console.WriteLine(s2);}}
A.代码编译失败
B.运行时错误,抛出NullPointerException异常
C.打印输出nullnull
D.代码编译成功,打印输出内容为空白行
publiC class Example{
publ ic StatiC VOid main(String args[]){
StatiC int x[]=new int[15]j
System.out.printin(X[5])j
}
)
说法正确的是______。
A.编译时出错 B.运行时出错
C.输出结果为0 D.无输出
public class exl6
{
public static void main(String[] args)
{
int i;
int a[] = new int[10];
for(i = O; i < a.length; i++)
a[i] = i * 10 + j;
for(i = 1; i < a.length; i++)
if(a[i]%5 == O)
System,out.println(a[i]);
}
}
A、false true
B、true false
C、false false
D、true true
A、编译不通过
B、编译通过,运行时异常
C、编译运行都正常,输出3
D、编译运行都正常,输出4
A. 5
B. 4
C. 6
D. 不确定
A.good and abc
B.good and gbc
C.test ok and abc
D.test ok and gbc
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!