Java does not use pointer, per se.  Objects can have one or more references, 
i.e, 

Pizza pepperoni = new Pizza("Pepperoni");
pepperoni2 = pepperoni; // both pepperoni and pepperoni2 "point" to the same 
object.

In Java, one must be mindful of the number of active objects on the heap; too 
many, and you can receive an "OutofMemoryException".  The number of objects 
should be controlled by either nullifying the object when object is no longer 
in use, or, if the object is no longer in use (no longer referenced), the 
object will become eligible for garbage collection.  The garbagecollection 
mechanism in Java is not guaranteed to run at any specific time; however, you 
can force the running of the garbage collector.
  ----- Original Message ----- 
  From: ANUJ KUMAR 
  To: java-ee-j2ee-programming-with-passion@googlegroups.com 
  Sent: Saturday, July 25, 2009 1:39 AM
  Subject: [java ee programming] core java


  how can we print address of a variable in java?
  



------------------------------------------------------------------------------



  No virus found in this incoming message.
  Checked by AVG - www.avg.com 
  Version: 8.5.392 / Virus Database: 270.13.28/2259 - Release Date: 07/24/09 
18:24:00

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to