Explain the term- comparing strings, JAVA Programming

Explain the term- Comparing Strings

For comparing Strings never use == operator, use equals method of String class.

- == operator compares addresses (shallow comparison) while equals compares values (deep comparison)

For instance: string1.equals (string2)

 

Posted Date: 9/20/2013 3:44:27 AM | Location : United States







Related Discussions:- Explain the term- comparing strings, Assignment Help, Ask Question on Explain the term- comparing strings, Get Answer, Expert's Help, Explain the term- comparing strings Discussions

Write discussion on Explain the term- comparing strings
Your posts are moderated
Related Questions

This assignment is about experimenting with the Java runtime system's garbage collection model, and comparing it with the C++ manual memory allocation model. Below is the Garbage J

i) Set the number of data points to 20 and the number of clusters to 2. Check box Show History. Click on Initialize. Click on Start. Click on Step . Observe which points ch

How to get all the registered objects in a rmiregistry? Ans) Using list method of Naming Class.

Question: (a) To be considered object-oriented(OO), a language should support abstraction, encapsulation, inheritance and polymorphism. Explain briefly each of the terms in

CHEMISTRY PROBLEMS

wap to find all the prime palindromic numbers

The LookupDispatchAction is a subclass of DispatchAction. It does a reverse lookup on the resource package to get the key and then gets the method whose name is associated with the

Instructions: Please make sure your solutions are original, in your own words, expressing your own ideas. Any copying from others' home-works, text books or online sources will

Question : (a) Class file verification in CLDC is different from class file verification in J2SE. Explain and discuss how and why it is different, illustrating your answer