Saturday, 15 June 2013

java program for substring() string function

import java.io.*;

public class Test
{
   public static void main(String args[])
       {
      String Str = new String("Welcome to Java Programming");

      System.out.print("Return Value :" );
      System.out.println(Str.substring(10) );

      System.out.print("Return Value :" );
      System.out.println(Str.substring(10, 15) );
   }
}

No comments: