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/StringV
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
Error:
Person.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/StringV
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