下载此文档

java考试.doc


文档分类:IT计算机 | 页数:约7页 举报非法文档有奖
1/7
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/7 下载此文档
文档列表 文档介绍
Test{
public static int main(String[] args){
Test h=new Test();
();
}

public void methodA(){
("Best Wishes");
}
}
2. class Test{
public static void main(String[] args){
Test c=new Test();
String s=new String("ello");
(s);
}
public void amethod(String s){
String c=“H”;
c+=s;
(c);
}
}
Test{
static int a=3;
}
final class Second extends Test {
void method(){
(a);
}
}
Top{
static void myTop(){
("Testing myTop method in Top class");
}
}
public class Down extends Top {
void myTop(){
("Testing myTop method in Down class");
}
public static void main(String[] args) {
Top t=new Down();
();
}
}
Super{
int i=0;
Super(String s){
i=10;
}
}
class Sub extends Super{
Sub(String s){
super(s);
i=20;
}
public static void main(String[] args) {
Sub b=new Sub("hello");
();
}
}
1:错误(main方法没有返int类型的值)2:错误(s是串c是字符)3:对4:错误( Top t=new Down(); )5:20
4:是函数重构问题
练习题之程序填空题一
一般回复引用回复返回顶部 
Posted:2010年5月20日 8:14:27
1.
puterable{
_____1___ public double __ ;
}
 
class 梯形 implements puterable 2______
{ double a,b,h;
梯形(double a,double b,double h)
{ =a;
=b;
=h;
}
public double 求面积()
{ return((1/)*(a+b)*h

java考试 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数7
  • 收藏数0 收藏
  • 顶次数0
  • 上传人endfrs
  • 文件大小0 KB
  • 时间2015-10-20