Java StringBuffer subSequence Example

StringBuffer class subSequence method example. This example shows you how to use subSequence method.


StringBuffer class subSequence method example. This example shows you how to use subSequence method.subSequence method returns a new character sequence that is a subsequence of this sequence.

Here is the code

/**
 * @(#) SubSequence. java
 * A class representing subSequence. method
 * @Version  01-May-2008
 @author   Rose India Team
 */

public class SubSequence{
    public static void main(String[] args){
        // Construct a StringBuffer object:
        StringBuffer s = new StringBuffer("Hello world!");

        // Returns a new character sequence that is a subsequence of this sequence.
    System.out.println(s.subSequence(3,9));
    }
}

null

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US