Strange error in netbeans ide

  • Thread starter Michael Preminger
  • Start date
M

Michael Preminger

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top