怎么會(huì)報(bào)錯(cuò)尼在eclipse中?
package phone;
public class Phone {
public static void main(String[] args) {
double screen;
double cpu;
double ram;
void call(){
System.out.println("Phone can be used to call");
}
void message(){
System.out.println("Phone can be used to send message");
}
}
}
2015-05-11
明白了 定義了個(gè)main方法,搞什么鬼。
2015-05-11
main方法中不能定義方法 只能調(diào)用
2015-05-11
不能把方法定義到main()方法里面
public class Phone {
double screen;
double cpu;
double ram;
void call(){
System.out.println("Phone can be used to call");
}
void message(){
System.out.println("Phone can be used to send message");
}
public static void main(String[] args) {
}
}