Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Strange error in netbeans ide (http://www.velocityreviews.com/forums/t134146-strange-error-in-netbeans-ide.html)

Michael Preminger 06-06-2004 09:22 PM

Strange error in netbeans ide
 
I am debugging a class, and getting a strange error message:

Error:
Person.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

Meaning that the class Person does not have a constructor with 3 String
arguments. It DOES!!!

So I was wandering about the V character appearing at the end of the
message. is this some kind of clue?

The error occurs when a sub-class of Person, Student, calls super
(String, String, String) first in its own constructor.

Anybody has any idea whats wrong here?

I attach the code of both classes:
---------------------------------------------------------------
class Person{
protected String personnummer;
protected String etternavn;
protected String fornavn;
public Person(String personnummer, String etternavn, String fornavn){
this.personnummer=personnummer;
this.etternavn=etternavn;
this.fornavn=fornavn;
}
}
class Student extends Person{
static HashMap alleStud;
private Vector paameldinger;
public Student(String personnummer, String etternavn, String fornavn){
super(personnummer, etternavn, fornavn);/*error happens here*/
paameldinger=new Vector();
if (alleStud==null)
alleStud=new HashMap();

alleStud.put(personnummer, this);
}
}

Thanks

Michael


All times are GMT. The time now is 10:00 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.