Top "Instantiation" questions

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

How to create a generic array in Java?

Due to the implementation of Java generics, you can't have code like this: public class GenSet<E> { private …

java arrays generics reflection instantiation
Creating an instance using the class name and calling constructor

Is there a way to create an instance of a particular class given the class name (dynamic) and pass parameters …

java reflection instantiation
What is the difference between "Class.forName()" and "Class.forName().newInstance()"?

What is the difference between Class.forName() and Class.forName().newInstance()? I do not understand the significant difference (I have …

java class object instantiation
Create an instance of a class from a string

Is there a way to create an instance of a class based on the fact I know the name of …

c# .net instantiation system.type
C++ Object Instantiation

I'm a C programmer trying to understand C++. Many tutorials demonstrate object instantiation using a snippet such as: Dog* sparky = …

c++ instantiation
Why do I get an error instantiating an interface?

I have a class and an interface, and when I try to instantiate the interface, I get an error: Cannot …

c# oop class interface instantiation
Instance member cannot be used on type

I have the following class: class ReportView: NSView { var categoriesPerPage = [[Int]]() var numPages: Int = { return categoriesPerPage.count } } Compilation fails with …

swift instantiation getter-setter computed-properties
Is there a way to instantiate a class by name in Java?

I was looking as the question : Instantiate a class from its string name which describes how to instantiate a class …

java string object instantiation
How do I write a custom init for a UIView subclass in Swift?

Say I want to init a UIView subclass with a String and an Int. How would I do this in …

ios swift cocoa-touch uiview instantiation
How to instantiate an object in java?

I'm new in programming and I would like to know where did I go wrong in instantiating an object. Below …

java instantiation