Results 1 to 2 of 2
  1. #1
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    7

    Default [SOLVED] printing address of current instance of object?

    okay, so i was hoping that this problem was as simple as doing a println(this), but apparently that isn't valid code since this is a keyword, not an actual object. so, i was wondering if anyone knows how i can print out the address/reference to the current instance of an object. much thanks.

  2. #2
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    7

    Default

    nevermind, got the idea of just creating a new variable of the class' type and setting it equal to 'this' then printing it. not as simple a solution as i hoped, but still simple nonetheless.

Similar Threads

  1. [SOLVED] Non-synchronized instance method of an Object
    By piyu.sha in forum Threads and Synchronization
    Replies: 2
    Last Post: 10-06-2008, 06:35 AM
  2. instance access
    By sujaiyer85 in forum Advanced Java
    Replies: 2
    Last Post: 04-23-2008, 07:37 AM
  3. Printing all IP address of a site
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-24-2007, 07:38 PM
  4. New Instance for SWT
    By srinivasa_v in forum SWT / JFace
    Replies: 1
    Last Post: 08-08-2007, 01:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •