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:
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL