Strange error in netbeans ide

Discussion in 'Java' started by Michael Preminger, Jun 6, 2004.

  1. 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
     
    Michael Preminger, Jun 6, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pimousse
    Replies:
    2
    Views:
    3,639
    Roedy Green
    Apr 21, 2004
  2. Replies:
    5
    Views:
    925
    Axel Straschil
    Apr 6, 2005
  3. OtagoHarbour
    Replies:
    5
    Views:
    747
    Jorgen Grahn
    Jan 8, 2012
  4. OtagoHarbour
    Replies:
    5
    Views:
    342
    Jorgen Grahn
    Jan 8, 2012
  5. Brian A.
    Replies:
    4
    Views:
    142
    Brian A.
    Oct 31, 2008
Loading...

Share This Page