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

Search Interview Questions


 2355 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 'Cloning' - 5 question(s) found - Order By Newest

Frequently asked in Infosys and HCL Technologies ( Based on 2 feedback )
 Q1. What are different ways of object creation in Java ?Core Java
Admin
info@buggybread.com
Ans. Using new operator - new xyzClass()

Using factory methods - xyzFactory.getInstance( )

Using newInstance( ) method - (Class.forName(xyzClass))emp.newInstance( )

By cloning an already available object - (xyzClass)obj1.clone( )

  Sample Code for object initialization using clone

  Sample Code for object initialization using getInstance

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

   Like      Discuss      Correct / Improve     java   oops   object creation   new operator   class.forname   cloning   ebay     Intelligrape  Infosys  Polaris  British Telecom (BT)  Vyom Labs  Deutsche Bank  HCL Technologies   Genpact  Thomson Reuters      expert


 Q2. Why do we use a copy constructor ?2016-07-21 08:28:52

Ans. Copy Constructor is used for creating a duplicate of another object. Duplicate object will have the same state of the copied object but will have independent values in different memory locations. Copy Constructor can be useful to create duplicates of immutable objects as the Original cannot be tampered. Moreover It can be useful if base copies are required for individual requests in threading.

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

   Like      Discuss      Correct / Improve     copy constructor  clone  cloning object


 Q3. Difference between shallow copy and object cloning ?Core Java2017-01-12 14:21:02

Ans. Shallow copy is one of the way for object cloning, other being deep copy.

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

   Like      Discuss      Correct / Improve     cloning  shallow copy  object cloning      basic


 Q4. What is cloning in GIT ?GIT2017-02-08 12:39:40

Ans. Cloning is the process of making a copy. It could be creating local copy of another local repository or local copy of remote repository.

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

   Like      Discuss      Correct / Improve     GIT  Configuration Management  GIT Cloning


 Q5. What is object cloning ?Core Java2017-12-26 09:47:42

 This question was recently asked at 'Genpact'.This question is still unanswered. Can you please provide an answer.


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

   Like      Discuss      Correct / Improve     cloning     Genpact      basic        frequent




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: