|
-
comparing strings
Hi,
I already know you can't compare strings using ==, so I've tried using the
following code:-
if (lblcurPass.getText().equals(curPass))
However, even when lblcurPass and curPass are the same it will always return
false. I've also tried compareTo, and that returns false.
Using System.out.print I can display the two passwords, and they are indeed
the same on screen.
Comparing two strings in a seperate small applet also works fine
What's going wrong?
--
Richard Kirkcaldy
richard@technical-power.co.uk
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks