What is the difference between objects and primitives?

Primitive values can be stored in variables directly. Objects, on the other hand, are stored as references . A variable that has been assigned an object does not store that object directly, it stores the memory address of the location that the object exists at.

Sizin İçin Seçtik  How many types of objects are there in Java?

Leave a Reply

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