How to differentiate between a CreateObject() and GetObject() ?



How to differentiate between a CreateObject() and GetObject() ?..

Answer / Amijeet Singh

"CreateObject()" and "GetObject()" are often used methods in Object-Oriented Programming languages, such as JavaScript or Java. The key difference lies in their functionality:n
1. CreateObject(): This method is responsible for creating a new instance of an object, typically by invoking the class constructor.
2. GetObject(): This method is utilized to retrieve an existing instance of an object from storage, a registry, or another data structure."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOAD Interview Questions

Difference: 'uses', 'extends', 'includes'

7 Answers   Cognizant, Protech, TY, University,


How a program can be structured using the concept of object oriented programming?

1 Answers  


What is guard condition?

8 Answers   Mannar Company, Syntel,


What is polymorphism? When is it employed? give an example.

1 Answers   iNautix,


How do I make sure that an object is released in code such as a connection or file object?

1 Answers   MindCracker,


Can link and Association applied interchangeably?

2 Answers  


When do you prefer to use composition than aggregation?

1 Answers   InfoAxon Technologies, Protech,


Explain about abstraction?

1 Answers  


What is a default method? Why do we need default methods in java 8 interfaces?

1 Answers  


What is a functional interface? What is sam interface?

1 Answers  


What is the function of pure virtual functions?

1 Answers  


what are the different ways for a method to be overloaded?

1 Answers  


Categories