- 讲师:刘萍萍 / 谢楠
- 课时:160h
- 价格 4580 元
特色双名师解密新课程高频考点,送国家电网教材讲义,助力一次通关
配套通关班送国网在线题库一套
百度广告
what will happen when you attempt to compile and run the following code?
public class agg{static public long i=10;public static void main(string argv){ switch(i){ default: system.out.println("no value given"); case 1: system.out.println("one"); case 10: system.out.println("ten"); case 5: system.out.println("five"); } }}1) compile time error
3) output of "ten"
question 56)
given the following class
public class zeroprint{public static void main(string argv){ int i =0; //here }}which of the following lines if placed after the comment //here will print out 0.
1) system.out.println(i++);
3) system.out.println(i);
||| question 57)
given the following code
class base {}class agg extends base{ public string getfields(){ string name = "agg"; return name; }}public class avf{public static void main(string argv){ base a = new agg(); //here }}what code placed after the comment //here will result in calling the getfields method resulting in the output of the string "agg"?
1) system.out.println(a.getfields());
3) system.out.println((base) a.getfields());
责编:罗莉
上一篇:格林模拟试题三(下)(6)
下一篇:格林模拟试题三(下)(7)
课程专业名称 |
讲师 |
课时 |
查看课程 |
---|
课程专业名称 |
讲师 |
课时 |
查看课程 |
---|
点击加载更多评论>>