Results 1 to 3 of 3
  1. #1
    Jack is offline Senior Member
    Join Date
    Jun 2007
    Posts
    130
    Rep Power
    0

    Default Instance variable

    I am confused with variables. Is reference to instance of an object called instance variable or reference variable ?
    thanks in advance
    jack

  2. #2
    Ed
    Ed is offline Senior Member
    Join Date
    Jun 2007
    Posts
    110
    Rep Power
    0

    Default

    Instance is an instance of a class. So, an instance is an object made from a class. Instance variable is a variable that belongs to an instance, Local variable is a variable declared and defined in a method. If your object has an instance variable " int a" and the object has a method in which it has a local variable named int foo, in the method, the name foo should refer the local variable.

  3. #3
    Heather is offline Senior Member
    Join Date
    Jun 2007
    Posts
    164
    Rep Power
    10

Similar Threads

  1. Instantiation using an instance factory method
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-29-2008, 01:35 PM
  2. Create different instance of a tablemodel
    By Bill in forum AWT / Swing
    Replies: 6
    Last Post: 03-27-2008, 04:49 PM
  3. passing an array into an instance
    By lockmac in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 09:35 AM
  4. New Instance for SWT
    By srinivasa_v in forum SWT / JFace
    Replies: 1
    Last Post: 08-08-2007, 01:02 AM
  5. problems with Instance Data
    By paty in forum New To Java
    Replies: 2
    Last Post: 08-02-2007, 05:45 PM

Posting Permissions

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