What are objects?How they are created?
Answers
Answered by
5
❤All objects in Java programs are created on heap memory.
❤ An object is created based on its class.
❤You can consider a class as a blueprint, template, or a description how to create an object.
❤When an object is created, memory is allocated to hold the object properties.
FOR EX..CLASS OB=NEW OB.
Michael9197:
thnx
Answered by
0
Objects are usually models of conceptual or real-world entities; they consist of a combination of data, which models the state of the entity and operations which model the behavior of the entity. The body of a Sather class consists of a list of features which define the data and behavior of the class.
Object creation.
{
// Create an object
MyObject obj = new MyObject();
// Use the object
obj.printMyValues();
}
Similar questions