Java String substring(int beginIndex)Example
String class substring(int beginIndex)method example
String class substring(int beginIndex) method example. This example shows you how to use substring(int beginIndex) method.
Here is the code:-
/**
* @(#) Substringstring.java
*Program that Returns a new string starting with the index specified that is a substring of this string.
* @Version 01-May-2008
* @author Rose India Team
*/
public class Substringstring
{
public static void main(String[] args)
{
String str = "RoseIndia is my Team.";
//Returns a new string starting with 10 index of the above string declared above.
System.out.println(str.substring(10));
}
} |
-
|