格林模拟试题二(上)(1)
question 1)
what will happen when you attempt to compile and run this code
abstract class base{public void another(){
}
public class abs extends base{
abs a = new abs();
}
system.out.println("my func");
public void amethod(){
}
1) the code will compile and run, printing out the words "my func"
3) the code will compile but complain at run time that the base class has non abstract methods
question 2)
what will happen when you attempt to compile and run this code?
system.out.println("hello cruel world");
}
1) the compiler will complain that main is a reserved word and cannot be used for a class
3) the code will compile but will complain at run time that no constructor is defined
question 3)
which of the following are java modifiers?
1) public
3) friendly
5) vagrant
编辑推荐:
温馨提示:因考试政策、内容不断变化与调整,长理培训网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准! (责任编辑:长理培训)
点击加载更多评论>>