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
Question 1 What is Response Redirection? Explain in brief Question 2 What is JDBC? Explain Question 3 Write a short note on Expressions Question 4 What is an XML na

Why Local variable is preferred over Global variable ? In my point of view Global variable has a few advantage along with Local variables is preferred because of the subsequent

A specialized subclass of ActionForm that permits the creation of form beans with dynamic sets of properties (configured in configuration file), without requiring the developer to

Explain what is Multilevel Inheritance ? The Car-Motorcycle-MotorVehicle instances showed single-level inheritance. There's nothing to stop you from going next. You can describ

how to implement tsp problem using java applet to present in form of visulation

Java Project Introduction: In this project, you will explore a few sorting algorithms. You will also test their efficiency by both timing how long a given sorting operation take

699906626330444777707776662233777 decoding program

How to draw Polygons in java? In Java rectangles are defined through the position of their upper left hand corner, their height, and their width. Therefore it is implicitly sup

Write a JavaScript program to prompt the user for the radius of a sphere and call function sphereVolume to calculate and display the volume of the sphere in the status bar.

what is meant by thread