ALLInterview.com :: Home Page            
 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  >>  Java Related  >>  Java J2EE  >>  Core Java
 
 


 

 
 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
which class to use when concatenating
   strings in a loop.
 Question Submitted By :: Stalin
I also faced this Question!!     Rank Answer Posted By  
 
  Re: which class to use when concatenating strings in a loop.
Answer
# 1
StringBuffer 
Is This Answer Correct ?    7 Yes 0 No
Geeta
 
  Re: which class to use when concatenating strings in a loop.
Answer
# 2
we any use the both classes String and StringBuffer.
but if we use StringBuffer it would be advatagebecase we
are going to create only one Object.if we use the String
class it is going to create the one for each itration.now
it up to you which one to use
 
Is This Answer Correct ?    4 Yes 3 No
Narasimha
 
 
 
  Re: which class to use when concatenating strings in a loop.
Answer
# 3
string buffer and string builder classes are used to
concatenate the two or more strings in a loop.
 
Is This Answer Correct ?    0 Yes 0 No
Sitaram
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is the difference between the synchronized() & static synchronized()? HP2
write the hierarchy of component class?  1
what is the Diff. between Access Specifiers and Access Modifiers? Wipro38
Why can't we make jsp as a controller and action servlet in struts? TCS8
byte a=5; byte b=5; byte c=a+b; System.out.println(c); whats the o/p? Wipro6
Thanks A.jyotsna, Can u tell me differnce between abstract class and interface vikash  4
Can u write constructor in abstract.If yes den when it will be invoked. SunGard4
This is related to threads. I have a class with synchronized method m1(). Can I create different instances of this class and execute the m1() for different threads?  3
What is the need of "creating and throwing an UserdefinedException" when the "Exception" class is already available?  4
did interface can implementation method ? i know its not possible but my interviewer said its possible ..but how..? any one have idea ??? IBM7
What is the USE of Null interfaces ??...if thers nothing inside these interfaces how are they used and WHy are they used ???? No 1 has given a proper description yet  1
Is &&= a valid Java operator?  2
 
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 © 2012  ALLInterview.com.  All Rights Reserved.

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