在线等待??解答,快呀
一个很简单的程序:
public class Cath{
public static void main(String[] args){
System.out.println(Math.PI);
System.out.println(Math.E);
}
}
path 正确设置。jdk安装目录为D:\Program Files\jdk
运行提示:
E:\>javac Cath.java
Cath.java:4: cannot resolve symbol
symbol : variable PI
location: class Math
System.out.println(Math.PI);
^
Cath.java:5: cannot resolve symbol
symbol : variable E
location: class Math
System.out.println(Math.E);
^
2 errors
在程序前加入:import java.lang.Math; 可正常运行输出。
但是加入:import java.lang.*; 仍然不能运行,提示与上同样的错误。
在线等待解答