Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java has pointer concept?  RSS feed

 
Chan Lee
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22851
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java has references -- which is just like pointers except you can't do arithmetic on it.

Henry
 
fred rosenberger
lowercase baba
Bartender
Posts: 12441
42
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!