• Post Reply Bookmark Topic Watch Topic
  • New Topic

pointers  RSS feed

 
bharat bhasin
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how are references in java different from pointers in c and c++.
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't do pointer arithmetic is Java. All you can do, with a Java reference, is dereference it. So, tricks in C, such as calculating a memory location in an array or structure, to be treated as something else, won't work.

Henry
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!