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
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 ?
What are maps interfaces in the java collections? : java collections
Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?
What are the uses of the set interfaces in the java collections? : java collections
What are the differences between the java collection and the java list? : java collections
What is deque in the java collections framework? : java collections
What are the types of the main implementing classes in the map interfaces? : java collections
What are the types of java collections? : 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.
What are the interfaces in java collections? : java collections
please mail me the interview question based on java/j2ee
Which sorting algorithm is used by collections.sort() in java ?
What is the difference between comparable and comparator in java.util pkg?
Which java collection class can be used to maintain the entries in the order in which they were last accessed?