aspose file tools*
The moose likes Java in General and the fly likes Everything is a pointer in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Everything is a pointer in Java" Watch "Everything is a pointer in Java" New topic
Author

Everything is a pointer in Java

vicky bawge
Ranch Hand

Joined: Sep 04, 2001
Posts: 34
Everything is a pointer (reference) in java including the basic data types.
e.g even you can call getClass() for int.
Any objections.
-Vivek
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Uhhh... well, I think if you actually try it, you'll have a hard time getting int.getClass() to compile. There is a way to do something like this, but I think it will distract you from the main point - primitive types are not classes, or references, or pointers.


"I'm not back." - Bill Harding, Twister
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Becareful!!! DO NOT let Roseanne hear you say that!!!
You will hear the detailed definition of how references in Java can not be dereferenced etc and therefore are NOT pointers.
Perhaps you should join into this conversation.
Ahhhh - I see that you already have.
[This message has been edited by Cindy Glass (edited October 24, 2001).]


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Everything is a pointer in Java