Java StringBuffer length Example
StringBuffer class length method example. This example shows you how to use length method.
StringBuffer class length method example. This example shows you how to use length method.public int length() Returns the length (character count).
Here is the code
/**
* @(#) Length. java
* A class representing length method
* @Version 01-May-2008
* @author Rose India Team
*/
public class Length {
public static void main(String args[]) {
StringBuffer sb = new StringBuffer("Rose India");
// Returns the length string buffer.
System.out.println("Length of the buffer string : " + sb.length());
}
} |
null
|