JAVA
I am running into this error when trying to compile my ContactList code. I am working on the toString method in ContactList. Basically what i am trying to do is implement an array list but using the Contact class i created.
3. I consalia tic class Contact tipleaents Comparablectontacts Private data flelds ofivate String firsthanes = = b ortvate String lastlane = *ot private String clty = out private String state =, private String streetldadress = private string phonelheber = ou II II Contructors publte Contact(String ftrsthane, String Losthase, string etty, String state, String streetidiress, String phonefluber) f this.rurstilase = fursthane; this.tasthee = Lasthanef this.etty = ettys this.state = state; this.streethderess = streethdedress; this.phonelhuber a phonelluaber: 1 public Contact(String furstllane, string tasthaee, String phoneluaber) this.furstllane = ftrsthane; this. Lasthese = Lasthane; this.phonelluaber = phoneluaber; il II Class eethods (getters, inttiolizer, tostring, etc) public string getfirsthise() f return this.firstilsee; ) public string getlasthane() \& return this. Lesthase; ) public String getcity() ( return th(tity; \} public String getstate() { return this.state; } public string getstreethdiressi) ( return this.streethddress; ) publtc String getphonelluber() f return this. phonelhuber; ? this. furstlene furstilise this.Losthee = Lesthee; this.city = citys this.state = state; this.streethadress = streethadress; this.phoneltuber = phonellubert 3 public boolean equals(object obj) f If (1(obj instanceof contact)) return tolse; Contact ether =( Contact ) objt reture trues else reture folse; public int cemperefol (Contact another X II Cose were the lost nones for both contact cojects are the sane. If if the lost neses for both contacts are the saee v foll finto the if public string getphonell-bert) ( return this. phonelinetert ) this.firstines a firstheses this. Lastline - Lsthenes this.ctby = ctty this.state = state; this.streethedress = streathdress; this.phonelluber a phonelluber: publtc bootean equats(0bject obj) \{ (f (I(ob) instanceof Contact)) return false; contact other = (Contact) obj; if (firsthane.equatslother.firsthane) es tasthane.equatstother. Lastlkane)) return trues etse return tatses publte tht comparefolContact another X WI Case where the last nases for both contact objects are the sase. II If the last nanes for both contacts are the saae we foll tnto the if II clause vhere ve vill need to then cospare the ftrst nases of both contacts If (this. Lasthane.copareforanother. gettastlanet()) =0 ) \{ 3 etse t II If the last name of "another:" is lexographtcalty second ve return 1, else If ve return 1 3 I Sybolt eathod getFtrsthase() Tocattont vartabte currentiontact of type contact where contact is a type-varlablet contact extends object declared in elass contactLtst wainilisontactLtst. Jevatz2t errort cannot find symbol. sybols eethod getlasthane() tocatcon: vartable currentContact of type Contact vhere contact is a type-vartable: Contact extends object declared in class ContactLtst Notes, N.MM My maln. Java uses unchecked or unsafe operations. Notes Recomplle with x tint:unchecked for detatts. 2 errors oxit status 1 30