【分录题】写出下面程序运行结果。 public class Demo9 { public static void main(String[] args) { String msg="努力成就伟大梦想!"; for(int i=0;i<msg.length();i++) { if(i%2="=0)" continue; system.out.print(msg.charat(i)); } system.out.println("\n"+msg.substring(6,8));>
第1题
第2题
第3题
第4题
第5题
public class demo {
public static void main(string[] args) {
try { system.out.println(10 / 0)
system.out.println("除法正常运行")
} catch (arithmeticexception e) {
system.out.println("除数不能为0")
}
}
}
</p>
A、编译失败
B、编译通过,没有结果输出
C、输出:除法正常运行
D、输出:除数不能为0
第6题
publicclassStarDemo{
publicstaticvoidmain(String[]args){
for(inti=0;i<3;i++)
{
for(intj=0;j<=i;j++)
System.out.print("*");
System.out.println();
}
}
}
运行结果是:
第7题
第8题
A.5 6 6
B.5 5 6
C.6 7 7
D.6 6 6
第9题
A、ab
B、aqb
C、aqbaq
D、aqaqb
第10题
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!