Click here to watch in Youtube :
https://www.youtube.com/watch?v=06J5sB16omY&list=UUhwKlOVR041tngjerWxVccw&nohtml5=False
/* * public int length() * * Parameters: * ---------- * the length of the sequence of characters currently * represented by this object */ public class StringBufferDemo { public static void main(String[] args) { StringBuffer sb = new StringBuffer(); System.out.println("length = " + sb.length()); sb.append(40); System.out.println("length = " + sb.length()); } }
length = 0 length = 2
https://sites.google.com/site/javaee4321/java/StringBufferDemo_length_App.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/StringBufferDemo_length_App
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/88e1f032ca4ea5ed8e91e8ffa23db6cb018a79ff/BasicJava/StringBufferDemo_length_App/?at=master
See also:
No comments:
Post a Comment