java - Duplicate method Meeting(String) in type Meeting - Error -


hi guys i'm having error regarding duplicate constructors, according assignment need constructor different field.

specifications:

  1. meeting – location, subject, list of attendees string array, notes , addattendee(string name) method.
  2. constructor set single attendee attendee array.
  3. constructor accept array of strings assign list of attendees.
  4. two more constructors same previous 2 allow setting note field string.

here part of code

public meeting(string name) {     this.name = name;     listofattendees[count] = name;     count++;     // blank constructor no parameter super constructor  }  // constructor accept array of strings assign list of attendees public meeting(string[] listofattendees) {     this.listofattendees = listofattendees;  }  // constructors note field  public meeting(string notes) {    // error here!     this.notes = notes;  } 

you can not have more 1 method same name , same type of parameters.

make 1 constructor name , notes, , if want assign i.e name pass null parameter notes.

public meeting(string names, string notes); 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -