I am taking my first Java class. I am
having a couple problems. When compiling the following
code, I get an error on line 14. I am not sure what is
wrong.Also, when I try to run a java.class in dos. I get a
message "Exception in thread "main"
java.lang.NoClassDefFoundErro: Jhw4"The program I am trying to run works at
school, but not at home. I am using win98. Sorry for the
long post. Thanks in advance!Looking for help
in MN. Ryuipublic class Jhw04{ public
static void main (String [] args){ int
numStu=20; if(args.length !=1){ System.out.println("Please use a
number"); System.exit(0); }else{
numStu=Integer.parseInt(args[0]);} Person p = new Person("Perry",
1959); Employee e =
new Employee("Edgar", 1963,
65000.0); System.out.println(p); System.out.println(e); Student[] s
= new
Student[numStu]; for(int i=0;i<s.length;i++){ s[i]=new
Student("Student"+(i+1), (int)(Math.random()*1000000) %20+1970,
(long)(Math.random()*1000000),(int)(Math.random()*1000000)%4+1,"CS"); }
} }/*****class
student****/////class Student extends Person{private String
major;int sid, status;public Student(String nm, int
byear, String m, int id, int s){super(nm,
byear);major=m;sid=id;status=s;}public String
toString(){return "Student[super=" +
super.toString() +", major=" + major + ", sid=" + sid +", status="
+status +"]";}}/***** employee class
*****/class Employee extends Person{double
salary;public Employee(String nm, int byear,double
s){super(nm, byear); salary=s;}public String
toString(){return "Employee[super=" + super.toString() +",salary=
"+ salary +"]";}}/******** class
Person ********************/class Person {
public Person(String nm,int bYear) { name=nm;
birthYear=bYear; } public String getName() { return
name; } public int getBirthYear() { return
birthYear; } public String toString() {
return("Person[name= " + name +",birthyear ="+ birthYear+"]");
} private String name = new String("noname");
private int birthYear=0;}