早教吧 育儿知识 作业答案 考试题库 百科 知识分享

求JAVA高手帮我做一下这两道复习题,我好对答案四、程序查错classExample1{publicstaticvoidmain(String[]args){bytex=127;floatf=12.58;System.out.println("x="+x+",f="+f);

题目详情
求JAVA高手帮我做一下这两道复习题,我好对答案
四、程序查错
class Example_1 {
public static void main(String[] args){
byte x=127;
float f=12.58;
System.out.println("x="+x+",f="+f);
}
}

五、程序填空
_______ class human {
public _____ void walk();
}
class man ______ human{
void walk(){System.out.println("Man is walkng!");}
}
▼优质解答
答案和解析
第一题,运行错误.
应该是:float f = 12.58f;
第二题
abstract class human {
public abstract void walk();
}
class man extends human {
void walk() {
System.out.println("Man is walking!");
}
}