jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes Java has pointer concept? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java has pointer concept?" Watch "Java has pointer concept?" New topic

Java has pointer concept?

Chan Lee

Joined: Sep 02, 2008
Posts: 25
Hi friends,

Is Java has pointer concept? If so, how to declare and use?

If not,
1) why Java does not posses this feature?
2) It is also OOPs based language. Then, why C++ has and why not Java has?
Henry Wong

Joined: Sep 28, 2004
Posts: 20380

Java has references -- which is just like pointers except you can't do arithmetic on it.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11923

This looks an awful lot like a homework question. We try very hard to not hand out answer, but help you figure out the answer on your own. So, what has your own research uncovered? What exactly do you mean by "pointer concept"? Do you mean 'a variable that refers to something else'? Are you talking about pointer arithmetic?

Your second question makes less sense. Yes, Java is an OOP language - but what does that have to do with pointers? C has them and is definitely NOT OOP. I'm sure there are other languages that don't have them that are OO

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
I agree. Here's the link: http://aspose.com/file-tools
subject: Java has pointer concept?
It's not a secret anymore!