Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Are Java objects pointers?

Java objects pointers
0
Posted

Are Java objects pointers?

0

Ans : No; Java objects are objects (typed containers for data plus associated methods), but the Java language lets you access objects only via references. The Java runtime is filled with objects-created by the system and by your program. An object is a programming entity that holds data and is associated with a class; the class defines both the data and services that its objects support. Although objects are the heart of your Java program, you never get direct access to them. The Java language lets you handle only object references-values that refer to objects but completely lack arithmetic (pointer-like) properties . Whenever a variable, method argument, or method return value appears to work with an object, it is in fact working indirectly through an object reference.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.