Why does Java not support pointer? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why does Java not support pointer?

8th Apr 2018, 7:32 PM
Sunny Patel
Sunny Patel - avatar
2 Answers
+ 7
Pointers in languages that have them make possible bugs that are extremely difficult to track down and fix. Java's designers wanted to eliminate those bugs. By making the pointers hidden and under compiler control, the coder can only make pointer mistakes that can be detected.
8th Apr 2018, 8:15 PM
John Wells
John Wells - avatar
+ 5
Because the idea of Java is to build very huge enterprice applications - with bilions lines of code. This code will be very hard to maintain and extend if code is full of pointers. You can do similar thing to c++ pointers - wrap your parameters inside another object and pass that object reference in as a parameter.
8th Apr 2018, 7:45 PM
Vladi Petrov
Vladi Petrov - avatar