Saturday, January 16, 2016

Why we are not using pointer in core java?

Why we are not using pointer in core java?
Ans:
Pointer in C++, gives as reference to object from outside. If we provide same thing in java, the concept of encapsulation will be violate. So Java does not provide this feature till 6.0 version. Recently Java added this feature in java 7.0 but they have different name Closure, which gives pointer to function, as callback in C.

No comments:

Post a Comment