File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Java has pointer concept?

Chan Lee
Greenhorn

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
author
Sheriff

Joined: Sep 28, 2004
Posts: 18829
    
  40

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

Henry


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

Joined: Oct 02, 2003
Posts: 11311
    
  16

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?