Why does not use pointer in java?

Java

1 answer

Answer

1111462

2026-07-17 15:50

+ Follow

Java
Java

You do not use pointers in Java because the language designers decided to abstract memory management to a higher level in Java than in C. The reason for this is that it is easy to make mistakes using pointers and other lower level memory management techniques. These mistakes can lead to bugs. hard to read code, memory leaks that waste system resources, and security issues. Instead for the most part Java takes care of memory management for the user who can instead specify behavior though the object oriented techniques that are safer and easier to understand. The downside is that the programmers lose some control and flexibility in using memory. Also, programs using Java take a small performance hit in some cases because of the extra work Java has to do to manage memory itself.

They are, however in Java they are called references.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.