validation in java
I am newbie in java ..so I need some help in validation in java...
surname = b.readLine();
if (surname != null && surname != surname1)
then fileOut.write(surname, 0, surname.length());//write in file
else System.out.println(" exisiting users or no users");
for example, I am creating a new customer, so I try to read and write input...when I try to validate for the customer name,i am searching whether if the same person exist...
how do they know that I am trying to refer my surname 1 as the existing value in text file?Any suggestion or ideas to enlighten me?
you cannot compare strings using !=
you must usethe following:
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center