Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Compare string example

In this section, you will learn how to compare two string in java.

Tutorial Details:

The java lang package provides a method to compare two with their case either upper and lower. The equals() method provides the facility of comparing the two strings.

The following program uses the equals() method and helps you to compare the two strings. If both strings are equal, it will display a message "The given strings are equal" otherwise it will show "The given string are not equal".


 

Rate Tutorial:
http://www.roseindia.net/java/beginners/CompString.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Compare string example

View Tutorial:
Compare string example

Related Tutorials:

Container support for objects
Container support for objects
 
Programming Java threads in the real world, Part 4 - JavaWorld - December 1998
Programming Java threads in the real world, Part 4 - JavaWorld - December 1998
 
Speed up listener notification - JavaWorld February 2000
Speed up listener notification - JavaWorld February 2000
 
StringBuffer versus String - JavaWorld March 2000
StringBuffer versus String - JavaWorld March 2000
 
Easy Java/XML integration with JDOM, Part 2 - JavaWorld July 2000
Easy Java/XML integration with JDOM, Part 2 - JavaWorld July 2000
 
Brewing entity Enterprise JavaBeans - JavaWorld September 2000
Brewing entity Enterprise JavaBeans - JavaWorld September 2000
 
XML document processing in Java using XPath and XSLT - JavaWorld September 2000
XML document processing in Java using XPath and XSLT - JavaWorld September 2000
 
Retrofit existing applications with RMI - JavaWorld January 2001
Retrofit existing applications with RMI - JavaWorld January 2001
 
Plant your data in a ternary search tree - JavaWorld February 2001
Plant your data in a ternary search tree - JavaWorld February 2001
 
Jato: The new kid on the open source block - JavaWorld March 2001
Jato: The new kid on the open source block - JavaWorld March 2001
 
Java Tip 130: Do you know your data size?
Java Tip 130: Do you know your data size?
 
Interesting informations
Interesting informations
 
Speed up your Swing GUI construction with better building blocks
Speed up your Swing GUI construction with better building blocks
 
Java's character and assorted string classes support text-processing
Java's character and assorted string classes support text-processing
 
J2ME devices: Real-world performance
J2ME devices: Real-world performance
 
Sort it out
Sort it out
 
Unwrap the package statement's potential
Unwrap the package statement's potential
 
Smartly load your properties
Smartly load your properties
 
Good ideas
Good ideas
 
Interesting ...
Interesting ...
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.