Java SubString

String class provides number of methods for manipulating the strings.

Ads

Java SubString

     

String class provides number of methods for manipulating the strings. substring() is one of the method of String class that is used to get some part of the original string as String object. substring provides a way of making a copy of a piece of a String. This method has two forms:

substring(int beginIndex):  This method returns a new string that will contain a substring of original string starting from the index passed as argument to the method up to the end of the original string.

substring(int beginIndex, int endIndex):  This method returns a new string that will contain a substring of original string starting from the index passed as first argument up to one less than the second argument of the method i.e. from beginIndex to (endIndex-1).

To know more about substring go to the url:

http:/www.roseindia.net/java/beginners/SubstringExample.shtml

 

Advertisements

Share on Google+Share on Google+

Java SubString

Posted on: November 17, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Java SubString  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:1
ki
January 10, 2012
programmning

none

Ads

 

Ads