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   To Refer this Site to Your Friends   Click Here
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
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 ?    3 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 ?    2 Yes 2 No
Narasimha
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is synchronization  3
What is the GregorianCalendar class? HCL1
What is meant by final class, methods and variables?  2
Given: 11. public static void main(String[] args) { 12. Integer i = uew Integer(1) + new Integer(2); 13. switch(i) { 14. case 3: System.out.println(”three”); break; 15. default: System.out.println(”other”); break; 16. } 17. } ‘What is the result? 1 three 2 other 3 An exception is thrown at runtime. 4 Compilation fails because of an error on line 12.  2
what is the difference between sleep() and Wait()? Accenture4
In what type of containers, Border layout is a default layout?  3
What is the minimum and maximum length of an identifier? TCS6
what is the use of private constructor in core java? Satyam3
Difference between Superclass and Subclass?  2
what is difference betwwen hashmap and hashtable ? Fidelity6
hi to all. well can you please tell me that why String class is immutable? Thanks in advance. Huawei3
Can u write constructor in abstract.If yes den when it will be invoked. SunGard3
What is the superclass of exception?  2
what is difference between abstraction and interface? FIC6
Instead of writing Home, Remote Interfaces if i directly extends EJBObject to bean class what happens? Flextronics1
Which of these methods belong to Thread & Object class? join, yield, sleep, wait, notify Ericsson2
What is the Vector class?  3
Need 2+ yrs experienced java techinical question papaer for company Iflex  1
What is file class and what is its purpose?  1
What Method and class used for Connection pooling ? Wipro4
 
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