Why pointers are not used in java

Showing Answers 1 - 4 of 4 Answers

pattu

  • Oct 17th, 2005
 

bcoz ....we can access the memory area through pointers...the memory area may contain important data which should not be accessed by the unauthorised person...to ensure security ,pointers are not used in java....

  Was this answer useful?  Yes

Funda ? Dynamic Memory Management.

Some of the important differences between Java and C or C++ is how they handle memory. Java eliminates pointers and adds garbage collection and true arrays to the language. C uses pointers for memory management, for building linked lists, trees etc. In a way Java provides a safe kind of pointer- ?references?. A reference is a strongly typed handle for an object. Garbage collection alone saves the programmers from errors in C or C++ like explicit memory allocation & deallocation.

  Was this answer useful?  Yes

Pranali Patil

  • Oct 21st, 2005
 

Java provides applet ,which is a major strength of java. Applets are forign programs, downloaded and executed in java compatible browser on client machine, so they are restricted to access the local machine. if we provide ptrs then,applets could be able to access local machine and would be threat for security. to avoi this java provides no support for pointers. but this fact doesn't reduce java's functionality. 

  Was this answer useful?  Yes

Devidas Sonawane

  • Oct 25th, 2005
 

Java is developed to make easy as compared with the C and CPP. It is overcomes ambiguity of Pointers and internally pointers are used to make user friendly. There is no technically terms to use pinter's in java as like native keyword.   

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions