Why pointers are eliminated from java?

1) Pointers lead to confusion for programmer.
2) Pointers may crash a program easily, for example, when we add two pointers and also program crashes immediately when we forgot to free the memory allotted to a variable.
3) Pointers break security. Using pointers, harmful programs like Virus and other hacking programs can be developed.

Because of these reason, pointers have been eliminated from Java.

No comments:

Post a Comment