import java.util.Date;
public class CalTimeFormat {
public static int getNowTime(){
Date da = new Date();
String dd = da.toLocaleString().substring(9,17);
String[] time = dd.split(":");
double j = (Integer.parseInt(time[0])*60+Integer.parseInt(time[1]))/5*2.83;
return (int)j;
}
public static void main(String[] args) {
System.out.println(CalTimeFormat.getNowTime());
}
}
上面的java 类能正常运行
为什么我在jsp 中调用
int i = CalTimeFormat.getNowTime();
就报 java.lang.NoSuchMethodError 异常
谢谢大家