String.
-----------------------
- mutable sequence of characters
- cant append or insert char/string in existing object, a new object will be created.
- its synchronized.
- for each substring or any operation, a new object is created and given its reference.
StringBuffer
-----------------------
- an immutable sequence of characters
- allows to insert, append char/string within the existing object.
- its synchronized.
StringBuilder
-----------------------
- has been introduced in J2SE 5.0
- its un-synchronized version of StringBuffer class.
- allows insert/append operations on string.
- mutable sequence of characters they are un-synchronized.
e hënë, 18 qershor 2007
Abonohu te:
Posto komente (Atom)
Nuk ka komente:
Posto një koment