Home Help Java S Java SubString
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Java SubString

Advertisement
String class provides number of methods for manipulating the strings.

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

 

Advertisement

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 17, 2009

Ask Questions?    Discuss: Java SubString  

Post your Comment


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

none
DMCA.com