Hello, I am writing a code that its showing the process of renewing your mail address when you move.
this is part of the program that i need help on
public class NewDataEntry { private String name; private String oldAddress; private String newAddress; // a method that compares the old and the new address. if the address is the same the program goes through it // if they are not the same it's false, and it needs the new address. // a subclass for a new entry if the addresses are not the same. public String getName() { return name; } public String getoldAddress() { } public String getnewAddress() { } }
i need a method that it will compare the oldAddress with the newAddress, when it is inputed.
if the new address that is inputed its the same thing as we have on file than the program skips that method but if its not, it has to compare and replace it with the new one....Im having hard time getting this ...can someone guide me?