Substring
      This program explains the use of substring method of the String class
/*
	http://www.ProbCOMP.com	

	This program explains the use of substring method of the String class

*/


public class UsingSubstring {
	public static void main(String args[]) {

        String str = "The capital of India is Delhi ";
        System.out.println("Original string: " + str);
		System.out.println("Substring(2) : " + str.substring(2));
		System.out.println("Substring(5,10) : " +  str.substring(5,10));
	}
}
									

Download Program
Did You Know ?
IP address is a numerical label that is assigned to devices participating in a computer network. Read More