Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Harry Hunter   on May 12 In Java Category.

  
Question Answered By: Velma Adams   on May 12

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.

Share: 

 
 
Didn't find what you were looking for? Find more on Help with errors Or get search suggestion and latest updates.


Tagged: