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

当前位置:首页 > 精品文档java面向对象习题

精品文档java面向对象习题

  • 62 次阅读
  • 3 次下载
  • 2025/5/1 8:03:35

} public class NewSuper extends SuperEx { public NewSuper(String a,String b) { super(a,b); } public static void main(String args []) { SuperEx a = new SuperEx(\ SuperEx b = new NewSuper(\ a.aMethod(); b.aMethod(); } public void aMethod() { System.out.println(\ } } 1) The following is displayed: r:Hi s:Hi 2) Compiler error at the line \ 3) The following is displayed: r:Hi r:Hi s:Bart 4) The following is displayed r:Hi s:Tom r:Hi s:Bart String s= \s.concat(\s.replace('C','F'); System.out.println(s); What will be printed out? A. Compilation Error says that String is immutable B. ABFDE C. ABCDE D. ABCD class A { public int getNumber(int a) {

return a + 1; } } class B extends A { public int getNumber (int a) { return a + 2 } public static void main (String args[]) { A a = new B(); System.out.printIn(a.getNumber(0)); }} What is the result? A. Compilation succeeds and 1 is printed. B. Compilation succeeds and 2 is printed. C. An error at line 8 causes compilation to fail. D. An error at line 13 causes compilation to fail. E. An error at line 14 causes compilation to fail.

编写简单工厂模式

... ... ...

编写类似DAO模式的程序

练习编写二叉树, 使用前,中,后序遍历树。

写一个计算器的接口

从键盘输入字符串,回车后反转打印

假设字符串类似这样的aba和aab就相等,现在随便给你二组字符串,请编程比较他们看是否相等

从键盘输入字符串,回车后按单词反转 Where there is a way Way a is there where

从键盘读入几个数,打印最小的那个

编程显示某一文件目录下的文件名

给你一组字符串如:iu7i8hy4jnb2,让你编程输出里面的数字:7842

写一个代码片断统计一个字符串中出现的字符及其个数,例如对于字符串“abcaaabcd”,统计的结果是: a(4个)b(2个)c(2个)d(1个)

匹配英文字母组成的字符串(不区分大小写): 匹配ip地址:

匹配数字个数限制(此为6个数字)

IO

编程文件Copy程序

一个文本文件中约有10万多行的数据,每个数据占一行(数据为一个整数)。要求:统计出总行数,并找出出现次数最多的那个整数。

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

共分享92篇相关文档

文档简介:

} public class NewSuper extends SuperEx { public NewSuper(String a,String b) { super(a,b); } public static void main(String args []) { SuperEx a = new SuperEx(\ SuperEx b = new NewSuper(\ a.aMethod(); b.aMethod(); } public void aMethod() { System.out.println(\ } } 1) The following is displayed: r:Hi s:Hi 2) Compiler error at the line \ 3) The following is displayed: r:Hi r

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价: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