answersLogoWhite

0

How do you instantiate self created class in java?

Updated: 8/19/2019
User Avatar

Wiki User

12y ago

Best Answer

The exact same way you instantiate a class from any of the various Java libraries: by using the 'new' keyword.

i.e

MyClass A = new MyClass();

this forces the MyClass definition to run its Constructor method, and return an instance of object of type MyClass.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you instantiate self created class in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you import a self created class in java?

It's the same as importing any other class: import [package name].[class name];


Does Java has any music or video downloads?

if you have a computer to look this up...... you can go and find out your self


When was Self-Inflicted created?

Self-Inflicted was created in 1997.


When was For Self-Examination created?

For Self-Examination was created in 1851.


When was Song to Self created?

Song to Self was created in 2008.


When was The Outsourced Self created?

The Outsourced Self was created in 2012.


When was My Self Scumbag created?

My Self Scumbag was created in 2007.


When was At War with Self created?

At War with Self was created in 2004.


When was The Commanding Self created?

The Commanding Self was created in 1994.


When was Sources of the Self created?

Sources of the Self was created in 1989.


When was Self Worth created?

Self Worth was created in 1999.


When was The Century of the Self created?

The Century of the Self was created in 2002.