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
The Web container is used for managing the servlet's life cycle. The Web container produces an instance of the servlet and then the container invokes the init() function. At the co

How to Implementing Interfaces in java? To actually utilize this interface you create a class that involves a public double calculateTariff() method and declare in which the cl

Write a Java application to simulate a bank system. In the system, customers can open new bank accounts with the bank, and register/use an online account to manage their bank accou

State the Java Programmer Efficiency Faster Development Building an application in Java takes about 50% less time than in C or C++. So, faster time to market Java is said to

Explain System Colors in java 1.1? In Java 1.1, the java.awt.SystemColor class is a subclass of java.awt.Color that gives color constants in which match native component colors

Normal 0 false false false EN-US X-NONE X-NONE

What is ARPANET and who developed it? ARPANET stands for Advanced Research Projects. The initial reasons were to communicate along with and share computer resources between mainl

An execution of the JMS interface for a Message Oriented Middleware (MOM). Providers are executed as either a Java JMS execution or an adapter to a non-Java MOM.

How many iterations would this ‘for' loop run for? for ( x = 50 ; x document.write ( x ) ; } Answer: 50 iterations

Outbound Submissions and Tracking: Project Overview: In the current ARISg environment, expedited reports are qualified and distributed electronically to contacts maintaine