Saved Bookmarks
| 1. |
Differentiate between StringBuffer and StringBuilder classes in the context of Java. |
||||||||
|
Answer» Strings are JAVA objects that are INTERNALLY supported by a char array. Strings are immutable because arrays are immutable (they can't grow). Every time you make a change to a String, a new String is produced. Java, on the other hand, has a number of classes that can be used to manipulate strings. StringBuffer and StringBuilder are two such classes.
|
|||||||||