you're calling the Student
constructor with Student(String, int, long, int, String)
but there's no constructor to match that, only
Student(String, int, String, int, int) What I think you
want is this: for(int i=0;i<s.length;i++){
s[i]=new Student("Student"+(i+1),
(int)(Math.random()*1000000) %20+1970, "CS",
(int)(Math.random()*1000000), (int)(Math.random()*1000000)%4+1); }
I've changed the order of the parameters and also
changed the cast to long into a cast to int. As
for the error running a Java program, you may not
have the classpath set up properly.