环境变量已经设置好了,在j2sdk1.4.2_08中可以编译的过去但是执行不了
执行的时候 出现下面的提示
java.lang.NoClassDefFoundError: BreakDemo
Exception in thread "main" 代码如下
public class BreakDemo
{
public static void main(String[] args)
{
int arrayOfInts[] = {32,87,3,589,12,1076,2000,8,622,127};
int searchfor = 12;
int i = 0;
boolean foundIt = false ; for (;i<arrayOfInts.length;i++)
{
if(arrayOfInts[i]==searchfor)
{
foundIt = true;
break;
}
} if(foundIt)
{
System.out.println("Found"+searchfor+"ar index"+i);
}
else
{
System.out.println(searchfor+"not in the array");
}
}
}