answersLogoWhite

0

No, that would be a constructor. A constructor is involved in creating objects.

User Avatar

Wiki User

10y ago

What else can I help you with?

Continue Learning about Engineering

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 is instantiating in java?

To instantiate is to create a new "instance" of an "object" in object-oriented programming. For example, say you create an Object by defining a class called Square: (note: this is C++ but the principles are the same) class Square{ private: int length, width; public: getArea(){return length*width); }; The above class is an Object. When you create this object, that is called an "instance" of the object: int main() { Square x = new Square; // x is an "instance" of the Square "object" Square y = new Square; // y is a separate "instance" of the Square "object" return 0; }


Could calloc assign memory for object?

yes,it will create memory


What does the java new operator do?

The new keyword tells Java that you want to create a new instance of a class by invoking one of the constructors for that class.// Create a new, empty String objectString s1 = new String();// Create a new String object with a different constructorString s2 = new String("howdy");


Can you initialize an object without constructor in java?

No. if you wish to create an object that you plan on using in a java program then the answer is NO. You cannot initialize an object of a Java class without calling the constructor.

Related Questions

What is the difference between constractor and distractor?

A constructor is a method in a class that is called when an object is created to initialize its state. A distractor, on the other hand, is not a commonly recognized term in the context of programming. It is possible you may mean "destructor," which is a method that is called when an object is destroyed to clean up resources before the memory is deallocated.


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();


need to know where to apply for my contraCTORS Licence in palm springs ,ca?

The Constractor's State Licensing Board can be reached at 800-321-2752.


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 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.


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.


What is the object to form?

The object of forming something is to create or shape it into a specific structure or design.


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.