answersLogoWhite

0

How do you create the object?

Updated: 8/19/2019
User Avatar

Wiki User

13y ago

Best Answer

ClassName instName = new ClassName();

where class name is the class, instName is the variable for the instantiated class, and ClassName() is the constructor.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you create the object?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can we create more than 2 threads for a single object in java?

yes , we can create more than 2 threads for an object provided if all threads are reading the object. It will create deadlock in case multiple threads are writing into same object, hence we should not create multiple in this case.


What is meant by instancing a class?

The class can be considered a template to create objects. When you create an object, you create it on the basis of the specified class - the object is an instance of the class, and the act of creating the object is also known as "instantiating" the class.


What are object and how object created?

Every thing is object. An object is formed by one or more object. even variable and function are object in java. how to create object: class book{ String name; } now if we want to create an object of book type then book mybook = new book();


What is overlaping in art?

Overlapping refers to the placement of an object to create the illusion of depth.


Use of constructor?

to create an instance of object


Can you create an object of interface in java?

maybe


For what reason might an engineer need to create a section view for an object?

An engineer might need to create a section view for an object to see what dimensions are on that section of and object or to see it in greater detail.


For what reason might an engineer need to create a section view of an object?

An engineer might need to create a section view for an object to see what dimensions are on that section of and object or to see it in greater detail.


How do you create unidirectional replication relationships?

If you want to create an exact copy or replication of an object and make it unidirectional just continue as you normally would to create the object. It will go in two different directions.


Which object must you first create in architectural desktop to create a section of a model?

Paint


Is it possible to make an object without shadow?

no its not. since when light falls on the (object) it will create a shadow.


How constructor automatically invoked?

when we create the object of that class