JAVA EXAMPLE PROGRAMS
Publish Your Article Here
Java2Novice - YouTube Channel
String Vs StringBuffer
We know that String is immutable object. We can not change the value of a String object once it is initiated. If we try to change the value of the existing String object then it creates new object rather than changing the value of the existing object. So incase, we are going to do more modificatios on String, then use StringBuffer. StringBuffer updates the existing objects value, rather creating new object.
Before you go and criticize the younger generation, just remember who raised them.
-- Unknown Author
Few Random Java Examples
|Reference: Java™ Platform Standard Ed. 7 - API Specification | Java™ Platform Standard Ed. 8 - API Specification | Java is registered trademark of Oracle.