Frequently Asked Questions- My java script ...
Java does not equal javascript (notice the uppercase and lowercase use). Java is a programming language developed by Sun Microsystems. javascript is a client-side language used in html
- Why doesn't String == work?
Strings in Java aren't considered a primitive type. Instead a String is a class type and as such whenever you create it you are just creating a pointer to the memory where the data for the String object is being held. In order to do a correct equals you need to use either equals or equalsIgnoreCase.
__________________
"To iterate is human, to recurse divine." -L. Peter Deutsch
Last edited by Aradon; 06-08-2008 at 02:47 PM..
|