Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By JosAH

Thread: variable usage

  1. #1
    seredi is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default variable usage

    How to use variable declared in one java program in another java program?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,043
    Blog Entries
    7
    Rep Power
    23

    Default Re: variable usage

    A variable is always encapsulated in a class (static) or an instance thereof; if you want to use that variable you either have to have a reference available to that class (or instance) or have to make that class (or instance) manupulate the variable itself so you also need a reference to that class or instance.

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

  3. #3
    seredi is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default Re: variable usage

    i cant get it.
    Kind enough to give some example?

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,043
    Blog Entries
    7
    Rep Power
    23

    Default Re: variable usage

    Even better, read the tutorials because your question is so basic that I doubt that you understood the tiniest bit of object oriented programming.

    kind regards,

    Jos
    Last edited by JosAH; 09-21-2011 at 11:25 AM.
    DarrylBurke likes this.
    The only person who got everything done by Friday was Robinson Crusoe.

Similar Threads

  1. Dynamic variable name based on other variable
    By nadissen in forum Eclipse
    Replies: 4
    Last Post: 05-06-2011, 06:22 PM
  2. Replies: 11
    Last Post: 07-07-2010, 06:02 AM
  3. SerialModemGateway() Usage
    By ajaxjagadish in forum Advanced Java
    Replies: 1
    Last Post: 03-25-2010, 09:24 AM
  4. HashMap usage
    By vasavi.singh in forum New To Java
    Replies: 4
    Last Post: 03-05-2009, 05:50 PM
  5. Integer Usage
    By bluegreen7hi in forum New To Java
    Replies: 11
    Last Post: 01-24-2008, 09:54 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
  •