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 is mean by hasing and maping in java platform and advantage?
What is the use of the list interface in the java collection? : java collections
Which sorting algorithm is used by collections.sort() in java ?
In hyderabad, which s/w training center is best for java, other than corejava what r the new tools to learn in java,which tool is best & have current requirement,pls give me information about java to learn ?
HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS
What are the main classes of the list interfaces? : java collections
What are the different types of collections views being provided by the map interface? : java collections
What are the types of java collections? : java collections
please mail me the interview question based on java/j2ee
What are the queues in the java collection framework? : java collections
What are the considerations to be made in case of loops in java ?
What are maps interfaces in the java collections? : java collections
who will give req's to u?. how they send req's to u? . what design documents contains?. when bugs raised on other developer code how to report to them?.(throgh mail or ........). how to retrive 100 recods from dao layer to presentation layer.using which collection?. what is sequence diagram.?.
Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword
What are the different types of features of the java collections framework? : java collections