下载此文档

JAVA题库格林模拟试题二(上).doc


文档分类:资格/认证考试 | 页数:约4页 举报非法文档有奖
1/4
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/4 下载此文档
文档列表 文档介绍
JAVA 题库 :格林模拟试题二 ( 上 )(2)
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(){
("another method");
}
}
public class abs extends base{
public static void main(string argv[]){
abs a = new abs();
();
}
public void myfunc(){
("my func");
}
1
public void amethod(){
myfunc();
}
}
the code will compile and run, printing out the words "my func"
the compiler will complain that the base class is not declared as abstract.
the code will compile but complain at run time that the
base class has non abstract methods
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
to define a new data type such as an unsigned integer
to write optimised code for performance in a language such as c/c++
to overcome the limitation of the private scope of a
method
2
question 6)what will happen when you attem

JAVA题库格林模拟试题二(上) 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数4
  • 收藏数0 收藏
  • 顶次数0
  • 上传人泰山飞鸟
  • 文件大小23 KB
  • 时间2022-01-05