子汐剪衣服网盘:为什么我写的第一个java程序不成功?

来源:百度文库 编辑:高考问答 时间:2024/05/08 15:07:08
我是用JCreator Pro写的
可是一编译就出现了
excepion in thread "main"java.lang.noclassdeffounderror:test1
press any key to continue...

什么意思呀
我的程序代码是:public class test1{
public static void main(string args[]){
float t=9.0f;
int q=5;
system.out.println((t++)*(--q));
}
}

String和System首字母要大写!

/*将下文件保存为test1.java,public类名必须和文件名相同,而且java区分大小写,该大写就要大写。*/

public class test1{
public static void main(String args[]){
float t=9.0f;
int q=5;
System.out.println((t++)*(--q));
}
}
javac test1.java
java test1
这样你就可以得到正确的结果了

public class test1{
public static void main(String args[]){
float t=9.0f;
int q=5;
System.out.println((t++)*(--q));
}
}
现在可以了,我调试过了.