public class Test{
public static void main(String[] args){
int a=25,b=3;
boolean d=a<b;
System.out.println("a<b="+d=;
int e=3;
if(e!=0&&a/e>5)
System.out.println("a/e="+a/e);
int f=0;
if(f!=0&&a/f>5)
System.out.println("a/f="+a/f);
else
System.out.println("f="+f);
}
}
编译后提示找不到类名,咋回事啊
public static void main(String[] args){
int a=25,b=3;
boolean d=a<b;
System.out.println("a<b="+d=;
int e=3;
if(e!=0&&a/e>5)
System.out.println("a/e="+a/e);
int f=0;
if(f!=0&&a/f>5)
System.out.println("a/f="+a/f);
else
System.out.println("f="+f);
}
}
编译后提示找不到类名,咋回事啊
解决方案 »
- 求解if (input.hasNextDouble()==true)什么意思
- osgi框架中,如果需要org.eclipse.swt.win32.win32.x86_3.4.1.v3449c,该如何配置启动参数
- 关于Java正则匹配很奇怪的问题
- 初学者非常非常虚心求教,怎样在SWT中的拖拽中实现半透明层并且跟综鼠标?
- 基本变量 赋值的问题,请指点一下
- 菜鸟的问题,肯请高手赐教
- 更改IP和DNS问题
- 关于NullPointerException异常,谢谢!
- 关于“this”指针的问题。
- 一个简单问题,来抢100分,来者有分.
- eclipse这个诡异的错误。谁来瞧瞧。
- 请高手帮忙看看为什么没有界面显示?
package com.student.test;public class Ansewer08 { public static void main(String[] args) {
int a = 25, b = 3;
boolean d = a < b;
System.out.println("a<b=" + d);
int e = 3;
if (e != 0 && a / e > 5)
System.out.println("a/e=" + a / e);
int f = 0;
if (f != 0 && a / f > 5)
System.out.println("a/f=" + a / f);
else
System.out.println("f=" + f); }}
还有就是你第五行少了个“)”
-------------------Configuration: <Default>--------------------
错误:找不到主类 com.student.test.Ansewer08
java.lang.NoClassDefFoundError: com.student.test.Ansewer08
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:198)
Caused by: java.lang.ClassNotFoundException: com.student.test.Ansewer08
at java.net.URLClassLoader$1.run(URLClassLoader.java:299)
at java.net.URLClassLoader$1.run(URLClassLoader.java:288)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:287)
at java.lang.ClassLoader.loadClass(ClassLoader.java:422)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:325)
at java.lang.ClassLoader.loadClass(ClassLoader.java:355)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:195)
Exception in thread "main"
Process completed.
还是没弄明白
那么 保存的文件应该为AAAA.javaAAAA.java文件目录下 >java com.student.test.AAAA