When object is created in Java where is it stored?

That means, whenever you create an object as static or local, it gets stored in heap . All the class variable primitive or object references (which is just a pointer to location where object is stored i.e. heap) are also stored in heap.

Sizin İçin Seçtik  How do you make a Main class?

Leave a Reply

Your email address will not be published. Required fields are marked *