Incorrect Output
May I know can I fix this program, it was inputted incorrectly - specifically on case 4. I already input a name but when I go for case 4 it says name not found -sorry for the grammatical error https://code.sololearn.com/cMfULUxMMU8f case 4: //Edit (Make changes / Update in any field) found = false; System.out.print("Enter NAME to UPDATE: "); name=console.next(); ListIterator<Person>li = c.listIterator(); while(li.hasNext()){ Person e = li.next(); if (e.getName() == name) { System.out.println("Enter new gender: "); gender = console.next(); System.out.println("Enter new age: "); age = console.nextInt(); li.set(new Person (name,gender,age)); found = true; } } if (!found){ System.out.println("Record Not Found: "); }else{ System.out.println("Record Updated Successfully: "); } break;