Answer Posted / sudheer babu
Both string and string buffer are different ,in the case of
the String it can ready only and immutable where as the
String Buffer is the modifier and mutable.
EX:
String s1="abc";
S.o.p(s1);---------->o/p is abc
StringBuffer sb=new StringBuffer("abc");
s.o.p(sb);---------->o/p is abc
here we can modify the String buffer values if we want i.e
sb.append("z");
s.o.p(sb);----------->0/p is abcz
"this is the basic difference between the String and String
Buffer."
Is This Answer Correct ? | 8 Yes | 9 No |
Post New Answer View All Answers
What are the classes in the java collection framework? : java collections
Which java collection class can be used to maintain the entries in the order in which they were last accessed?
What is an algorithm in java collection framework? : java collections
Which server-side script takes the input from JavaScript, can access the database if it needs to, and processes the data.
can u draw class/object diagram for ATM
What are the types of interface used in the java collections? : java collections
What are the main classes of the list interfaces? : java collections
What is the enumerator of the java collection framework? : java collections
Hi Friends , am newbie to ajax. For example just consider one account registration - A form contains 8 text fields with submit button. In this form second texbox contains "username " . On right side of text box there is a label box . On clilck action i need to determine user is available or not. Is it possible on clicking label or should i click submit button.
How do I find jre path in windows?
What is the difference between comparable and comparator in java.util pkg?
Should we create system software ( e.g operating system ) in java ?
What are the different types of features of the java collections framework? : java collections
What do you understand by synchronization? Why is it important?
Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword