- Interview Questions and Answers for 'Getinstance' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Interview Questions


 3180 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



- Interview Questions and Answers for 'Getinstance' - 2 question(s) found - Order By Newest

 Q1. Difference between Class#getInstance() and new operator ?
Admin
info@buggybread.com
Ans. Class.getInstance doesn't call the constructor whereas if we create an object using new operator , we need to have a matching constructor or copiler should provide a default constructor.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   constructor   object creation   default constructor   getinstance   new operator


Related Questions

  Can we create an object if a Class doesn't have any constructor ( not even the default provided by constructor ) ?
  Which of the following code is correct ?
  Which of the following is not a valid NumberFormat initialization ?


 Q2. Can we create an object if a Class doesn't have any constructor ( not even the default provided by constructor ) ?
Admin
info@buggybread.com
Ans. Yes , using Class.getInstance.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   oops   constructor   default constructor   class.getinstance


Related Questions

  What is a Default Constructor ?
  Will Compiler creates a default no argument constructor if we specify only multi argument constructor ?
  Difference between Class#getInstance() and new operator ?
  Does every class needs to have one non parameterized constructor ?
  Variable of the boolean type is automatically initialized as?
  Why Java provides default constructor ?
  In a case where there are no instance variables what does the default constructor initialize?
 Is it mandatory to have a default constructor ?
 Why Java doesn't provide a default constructor if we define an argument constructor ?




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: