云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > java题库

java题库

  • 62 次阅读
  • 3 次下载
  • 2025/5/3 1:15:51

System.out.println(\ }

public static void main(String argv[]){ Abs a = new Abs(); } }

10. 编译并运行下面程序,分析结果(继承,最终方法,无错) class Base{

public final void amethod(){

System.out.println(\ } }

public class Fin extends Base{

public static void main(String argv[]){ Base b = new Base(); b.amethod(); } }

11. 编译并运行下面程序,分析结果(最终方法不能被覆盖重写) class Base{

public final void amethod(){

System.out.println(\ } }

public class Fin extends Base{

public void amethod(){

System.out.println(\ }

public static void main(String argv[]){ Base b = new Base(); b.amethod(); }

12. 编译并运行下面程序,分析结果(构造方法为私有访问权限,只有该类有主方法时才能

运行, 此题没错,输入1至9) public class Hope{

public static void main(String argv[]){ Hope h = new Hope(); }

private Hope(){ for(int i =0; i <10; i ++){

System.out.println(i); }

} }

13. 编译并运行下面程序,分析结果( 主方法参数为字符串数组,而不是字符串) public class MyMain{

public static void main(String argv){

System.out.println(\ } }

14. 编译并运行下面程序,分析结果(类的访问权限不能为private) private class Base{} public class Vis{

transient int iVal;

public static void main(String elephant[]){ } }

15. 编译并运行下面程序,分析结果(数组下标越界) public class MyAr{

public static void main(String argv[]){ int[] i = new int[5];

System.out.println(i[5]); } }

16. 编译并运行下面程序,分析结果(静态方法不能访问非静态数据) public class Arg{

String[] MyArg;

public static void main(String argv[]){ MyArg=argv; }

public void amethod(){

System.out.println(argv[1]); } }

17. 编译并运行下面程序,分析结果(字符比较:==是比较地址) public class StrEq{

搜索更多关于: java题库 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

System.out.println(\ } public static void main(String argv[]){ Abs a = new Abs(); } } 10. 编译并运行下面程序,分析结果(继承,最终方法,无错) class Base{ public final void amethod(){ System.out.println(\ } } public class Fin extends Base{ public static void main(String argv[]){ Base b = new Base();

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com