| 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: 16690
|
|
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: 9947
|
|
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
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
 |
|
|
subject: Java has pointer concept?
|
|
|