Question: Please help me fix the code. The error shows that PersonApp.java:48: error: expected return(name.equalsIgnoreCase(new(PersonApp)anotherPerson).name) ^ PersonApp.java:48: error: ')' expected return(name.equalsIgnoreCase(new(PersonApp)anotherPerson).name) ^ PersonApp.java:48: error: ';' expected
Please help me fix the code. The error shows that
PersonApp.java:48: error: 
public class PersonApp { private String name; private int age; private double income; public PersonApp () = name age = i income = 0.0; } public PersonApp (String n, int a, double i) { name = n; age = a; income = i; } public String getName() { return name; } public int getAge() { return age; } public double getIncome () { return income; } public void setName (String n) { name = n; } public void setAge(int a) { age = a; } public void setIncome (double i) { income = i; } public boolean equals (Object another Person) { return (name.equalsIgnorecase ((PersonApp) anotherPerson).name) && age == ((PersonApp) another person.age) && Math.abs (income ((PersonApp) another Person).income
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
