public class MyFirstApp { int eyes =2; int ears =2; int legs =4;
void eat(){ System.out.println("i can eat"); }
void run(){ System.out.println("i can run");
}
void drink(){ System.out.println("i can drink"); }
void info() { System.out.println("i have"+eyes+"eyes and "+eyes+" ears and "+legs+" legs")
pubilc static void main(String[] arys) {
MyFirstApp deer= new MyFirstApp() deer.eat(); deer.run(); deer.drink(); deer.info(); }
}
public class file { int eyes=2; int ears=2; int legs=4;
void eat(){ System.out.println("i can eat"); }
void run(){ System.out.println("i can run"); }
void drink(){ System.out.println("i can drink"); }
void info() { System.out.println("i have" + eyes + "eyes and " + eyes + " ears and " + legs + " legs"); }
public static void main(String[] args) {
file deer= new file();
deer.eat();
deer.run();
deer.drink();
deer.info();
}
}
是args,不是arys
而且有没有发现那个输出eyes输出了两次
MyFirstApp deer= new MyFirstApp()这句后面少分号
{$ item.file.size/1024/1024|number:2 $} MB