Wednesday, May 18, 2011

Difference between Pointer and reference

In OOP like Java, guys often speak that there are no pointers but there are references. Here the reference or a reference pointers like as follows.
Dog d;

Here d is reference.
Actual concept of pointers is not implemented in Java due to the reasons like confusion and the hell caused by them.

However there are pointers in Java but in JCuda (Java bindings for the CUDA runtime and driver API) there is a class called jcuda.Pointer.                      

No comments:
Write comments