Top "Instantiation" questions

Instantiation is the process of creating objects from a class in most object oriented and object based languages.

Avoid instantiating a class in java

Recently I've faced a question : How to avoid instantiating a Java class? However, I answered by saying: If you don't …

java class instantiation
Instantiating object from inside the main of that class in Java

I was looking through my OOP class documentation and I found this example: class Student { private String name; public int …

java class object main instantiation
Instantiate a class from its textual name

Don't ask me why but I need to do the following: string ClassName = "SomeClassName"; object o = MagicallyCreateInstance("SomeClassName"); I want …

c# string class instantiation
How to create inline objects with properties?

In Javascript it would be: var newObject = { 'propertyName' : 'propertyValue' }; newObject.propertyName; // returns "propertyValue" But the same syntax in Python would …

python instantiation dynamic-languages
How to instantiate a static vector of object?

I have a class A, which has a static vector of objects. The objects are of class B class A { …

c++ instantiation static-members
`new function()` with lower case "f" in JavaScript

My colleague has been using "new function()" with a lower case "f" to define new objects in JavaScript. It seems …

javascript function object instantiation
How do I force a particular instance of a C++ template to instantiate?

See title. I have a template. I want to force a particular instance of a template to instantiate. How do …

c++ templates instantiation
PHP: How to instantiate a class with arguments from within another class

I am in a situations where i need to instantiate a class with arguments from within an instance of another …

php oop class object instantiation
Generics and Class.forName

I would like to create an instance of a specified class using its name. My code is shown below. I …

java generics instantiation
Can a static nested class be instantiated in Java?

From Oracle's Java tutorials I've found this text: As with class methods and variables, a static nested class is associated …

java static nested instantiation