中文一二三区_九九在线中文字幕无码_国产一二区av_38激情网_欧美一区=区三区_亚洲高清免费观看在线视频

首頁 > 考試輔導 > 計算機考試 > JAVA認證 > JAVA認證試題集錦 > JAVA題庫:格林模擬試題二(上)(2)

JAVA題庫:格林模擬試題二(上)(2)

question 4)what will happen when you attempt to compile and run this code?

class base{
abstract public void myfunc();
public void another(){
system.out.println("another method");
}
}

public class abs extends base{
public static void main(string argv[]){
abs a = new abs();
a.amethod();
}

public void myfunc(){
system.out.println("my func");
}

public void amethod(){
myfunc();
}
}
1) the code will compile and run, printing out the words "my func"
2) the compiler will complain that the base class is not declared as abstract.
3) the code will compile but complain at run time that the base class has non abstract methods
4) the compiler will complain that the method myfunc in the base class has no body, nobody at all to looove it

question 5)why might you define a method as native?

1) to get to access hardware that java does not know about
2) to define a new data type such as an unsigned integer
3) to write optimised code for performance in a language such as c/c++
4) to overcome the limitation of the private scope of a method

question 6)what will happen when you attempt to compile and run this code?

class base{
public final void amethod(){
system.out.println("amethod");
}
}

public class fin extends base{
public static void main(string argv[]){
base b = new base();
b.amethod();
}
}
1) compile time error indicating that a class with any final methods must be declared final itself
2) compile time error indicating that you cannot inherit from a class with final methods
3) run time error indicating that base is not defined as final
4) success in compilation and output of "amethod" at run time.

主站蜘蛛池模板: 2021久久超碰国产精品最新 | 久久综合一区二区 | 精品香蕉99久久久久网站 | 99精品久久久久久久免费看蜜臀 | 久久人人97超碰人人澡爱香蕉 | 日韩综合福利视频 | 在线免费观看黄 | 国产亚洲精品久久久久久大师 | 一二三级黄色片 | 扒开双腿疯狂进出爽爽爽视频 | www.精品国产 | 国产妇女野外牲一级毛片 | 久久精品国产清高在天天线 | 亚洲国产一区二区视频 | 中文字幕一区在线 | av无码久久久久不卡网站 | 国产成人高清精品免费5388 | 请别相信她免费观看高清章若楠 | 日本福利视频一区 | 爱爱爱av | 日本午夜免费视频 | 日韩一日 | 肉大捧一进一出免费视频 | 亚洲一区日韩精品中文字幕 | 亚洲日本va中文字幕在线 | 欧美白丰满老太aaa片 | 国产免费a∨片在线软件 | 中文字幕国产高清 | 久久久久久人妻精品一区二区三区 | 国产综合一 | 成人乱码一区二区三区不卡视频 | 偷窥熟女大屁股对白视频 | 亚洲永久免费视频 | 女人18毛片a级毛片免费视频 | 免费裸体无遮挡黄网站免费看 | 久久一区二区三区四区 | 亚洲a级黄色片 | 成年免费视频播放网站推荐 | 国产精品久久久久9999县 | 国产精品臀控福利在线观看 | 亚洲国产精品久久久久日本竹山梨 |