Creation of String Buffer
Creation of String Buffer - Hallo sahabat Download APK, Pada Artikel yang anda baca kali ini dengan judul Creation of String Buffer, kami telah mempersiapkan artikel ini dengan baik untuk anda baca dan ambil informasi didalamnya. mudah-mudahan isi postingan
Artikel JAVA, yang kami tulis ini dapat anda pahami. baiklah, selamat membaca.
Judul : Creation of String Buffer
link : Creation of String Buffer
Anda sekarang membaca artikel Creation of String Buffer dengan alamat link https://aplikasimateri.blogspot.com/2017/01/creation-of-string-buffer.html
Judul : Creation of String Buffer
link : Creation of String Buffer
Creation of String Buffer
In this section, you will learn how to create a string buffer. Here we have used the following StringBuffer Constructors.
StringBuffer() //Default Constructor with 16 characters set
StringBuffer(String s) //String to String Buffer
StringBuffer(int initialCapacity) //StringBuffer?s with initial Capacity
Description of code:
As mentioned above we have taken three String buffer constructors here. One is the default with 16 characters and other two takes the String buffer and capacity of StringBuffer. Therefore we get the following output.
StringBuffer() //Default Constructor with 16 characters set
StringBuffer(String s) //String to String Buffer
StringBuffer(int initialCapacity) //StringBuffer?s with initial Capacity
Description of code:
As mentioned above we have taken three String buffer constructors here. One is the default with 16 characters and other two takes the String buffer and capacity of StringBuffer. Therefore we get the following output.
|
Output of the program:
C:\unique>javac StringBufferExample.java C:\unique>java StringBufferExample strBuffer1 : Bonjour strBuffer2 capacity : 60 strBuffer3 capacity : 16 C:\unique> |
Demikianlah Artikel Creation of String Buffer
Sekianlah artikel Creation of String Buffer kali ini, mudah-mudahan bisa memberi manfaat untuk anda semua. baiklah, sampai jumpa di postingan artikel lainnya.
Anda sekarang membaca artikel Creation of String Buffer dengan alamat link https://aplikasimateri.blogspot.com/2017/01/creation-of-string-buffer.html
0 Response to " Creation of String Buffer"
Post a Comment