ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
Difference between String and String Buffer?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Difference between String and String Buffer?
Answer
# 1
1. String objects are constants and immutable where as 
StringBuffer objects are not.
2.String class supports constant strings where as 
StringBuffer class supports growable and modifiable strings.
 
Is This Answer Correct ?    9 Yes 0 No
Janet
 
  Re: Difference between String and String Buffer?
Answer
# 2
String is immutable
String buffer is mutable

Ex String str = "abc";
str = "new String";
this will creat new memory location and stores "new String"

but in String buffer
StringBuffer strBuf = "abc";
strBuf = "new String"

it will overwrite in same memory location
 
Is This Answer Correct ?    7 Yes 0 No
Sumati
 
 
 
  Re: Difference between String and String Buffer?
Answer
# 3
string is immutable
string buffer is mutable
 
Is This Answer Correct ?    5 Yes 0 No
Ravikiran(aptech Mumbai)
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is difference between String buffer and String builder? Benchmark2
What is the difference between throw and throws?  5
What is anonymous class?  2
Can an anonymous class be declared as implementing an interface and extending a class?  1
What do you mean by the term transient? Ericsson4
What is a stream? what are the different types and classes of Streams?  2
What is object  6
what is Hashmap & Hashtable wirh example? Saksoft4
what is the difference b/w design pattern and architecture Covansys2
what is difference between abstraction and interface? FIC6
Name two subclasses of the TextComponent class?  2
If you are reviewing the code of your team members, what points will you look at, assuming the performance of the application is not so great KPIT2
What is a default package ?  7
What is the purpose of the finally clause?  3
class{ ... ... interface myinterface{ ... ... } abstract class{ .. .. } ... .. .. } is this possible to write "Interface and/ or Abstract class inside a class ? if possible whcich one is possible is only interface? is only abstract? Logica-CMG2
Explain the term serialization? Wipro6
If a multi threaded Java program has started numerous number of threads, at any point in time how to know which thread is currently executing/running ? iFlex7
what is overloading in java? DNS4
How to make class immutable  5
Is java is a fully object object oriented language? TCS15
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com