• Post Reply Bookmark Topic Watch Topic
  • New Topic

A curious doubt  RSS feed

 
schindler oscar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am very curious to know, without having pointers in java, how datastructures like linked list etc. have been implemented, does it use pointers internally? If not, how they are implemented in java.
Please help me out.
 
Svend Rost
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, Java has pointers - Java just doesn't have explicit pointers, i.e. you
can't manipulate with them.

An object in Java is a reference to a locating in memory, making it to a
pointer.

/Svend Rost
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When comparing Java to C, for example, one distinction between Java references and C pointers is the lack of C-style pointer arithmetic in Java

God, I miss pointer arithmetic so much
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"schindler oscar" --

Welcome to JavaRanch!

A bit of business: you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. Obviously fake names aren't acceptable. You can change your display name here. Thanks for your immediate attention.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!