|
蓝森林 http://www.lslnet.com 2006年6月6日 10:18
[help]我的程序怎么咯阿出这样的问题?
各位大虾,指点一下小弟程序中和调试的问题:
[code]import java. text. NumberFormat;
import java. lang.*;
class Exaple5_16
{
public static void main()
{
double a =Math.sqrt(5);
System. out. println("Before format: "+a);
NumberFormat f= NumberFormat. getInstance();
f.setMaximumFractionDigits(5);
f.setMinimumFractionDigits(3);
String s=f.format(a);
System.out.println("After format: "+s);
System. out .println("random nuimber: ");
int number=8;
for(int i=1; i< 20; i++)
{
int randomNumber=(int)(Math.random()*number)+1;
System.out.print(" "+randomNumber);
if(i%10==0)
System.out.println(" ");
}
}
}
调试步骤:
d:\javac example5_16.java
d:\java example5_16
Exception in thread "main" java.lang.NoClassDefFoundError:Example5_16
//小弟看不懂调试结果,请赐教。
[/img][/code] |
[help]我的程序怎么咯阿出这样的问题?
| [help]我的程序怎么咯阿出这样的问题?
呵呵
楼主不仅没有注意大小写
而且 楼主的类名写成了 Exaple5_16
写错了吧 应该是Example5_16
以后要注意啦~~~~~ |
[help]我的程序怎么咯阿出这样的问题?
谢谢各位! :P |
| |