- 讲师:刘萍萍 / 谢楠
- 课时:160h
- 价格 4580 元
特色双名师解密新课程高频考点,送国家电网教材讲义,助力一次通关
配套通关班送国网在线题库一套
百度广告
B. final
C. abstract
D. No modifier can be used
Explanation:
Correct Answer: B 29 of 60
Which one of the following is correct to declare a native method?
B. public native void test(){}
C. public void native test();
D. public native test(){}
Explanation:
Correct Answer: A 30 of 60
Given the following definition of a class:
public class Test {
private float f = 1.0;
int m = 12;
static int n=1;
public static void main(String arg) {
Test t = new Test();
// some code...
}
}
Which of the following usage are legal?
B. this.n
C. Test.m
D. Test.n
Explanation:
Correct Answer: A,D 31 of 60
|||
Given the following code:
1) class Example{
2) String str;
3) public Example(){
4) str= example;
5) }
6) public Example(String s){
7) str=s;
8) }
9) }
10) class Demo extends Example{
11) }
12) public class Test{
13) public void f () {
14) Example ex = new Example(Good);
15) Demo d = new Demo(Good);
16) }
Which line will cause an error?
B. line 6
C. line 10
D. line 14
E. line 15
Explanation:
Correct Answer: E 32 of 60
Given the following class definition in one source file:
class Base {
public Base (){ //... }
public Base ( int m ){ //... }
protected void fun( int n ){ //... }
}
public class Child extends Base{
// member methods
}
Which methods can be added into the Child class correctly?
B. void fun ( int n ){ //... }
C. protected void fun ( int n ) { //... }
D. public void fun ( int n ) { //... }
E. public m(){ //... }
Explanation:
Correct Answer: C,D 33 of 60
Which statements are correct?
B. A subclass inherits all methods ( including the constructor ) from the superclass.
C. A class can implement as many interfaces as needed.
D. When a class implements an interface, it can define as many methods of the interface as needed.
Explanation:
Correct Answer: A,C 34 of 60
责编:罗莉
上一篇:Java认证模考试题(四
下一篇:Java认证模考试题(六)
课程专业名称 |
讲师 |
课时 |
查看课程 |
---|
课程专业名称 |
讲师 |
课时 |
查看课程 |
---|
点击加载更多评论>>