• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Pointers

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am just beginning to use java, as I have an AP test in it soon. I was tasked with finding out if there were anything similiar to C++'s pointers in java. I believe that so far, I've found there aren't. Any help here would really be appreciated.
Thanks!
 
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are no explicit pointers in Java, so you won't find any syntax involving the (*).
 
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java references are much closer to C++ references.
For instance, you can't do arithmetic with Java references other than == .equals() instanceof
I think if you compare them in your textbooks, you'll find other similarities.
[ April 26, 2004: Message edited by: Mike Gershman ]
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is of course the NullPointer, most well known as the NullPointerException
 
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ar.. yes
C++ similar to Java
Java contains object reference when you create the object that using varible point to the created object
Such as
HelloWorld hw =new HelloWorld();
hw is the object reference
And linked list similar to C++ structure.
It may be wrong, It may be better if Bartenders or sheriffs explain

[ April 26, 2004: Message edited by: siu chung man ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Bill!
As you're learning to understand references (and variables) in Java, I recommend spending a few minutes reading a couple of the JavaRanch Campfire Stories - especially the "Cup Size" and "Pass-by-Value Please" stories.
reply
    Bookmark Topic Watch Topic
  • New Topic