Results 1 to 3 of 3

Thread: JAVA programming word

  1. #1
    WalkerCook is offline Senior Member
    Join Date
    Dec 2009
    Posts
    253
    Rep Power
    3

    Default JAVA programming word

    Hi I am new in JAVA programming word. I have one query related in class. There are two classes Class Parent and Class child. In Class parent i called as private variable. If we can access this private variable in Class B. please tell me, how we can access? Any help would be highly appreciated.

  2. #2
    PerezMorris is offline Senior Member
    Join Date
    Dec 2009
    Posts
    250
    Rep Power
    3

    Default

    If the variable is private then declare setter and getters to the variable and access the variable using the setter and getters in the other class.

  3. #3
    HallMiller is offline Senior Member
    Join Date
    Dec 2009
    Posts
    251
    Rep Power
    3

    Default

    The variable called in class A must be intended for available in inner class because Getter and setter is also a different method.

Similar Threads

  1. Replies: 0
    Last Post: 08-09-2010, 01:24 PM
  2. JAVA programming
    By LewisClark in forum Programming
    Replies: 1
    Last Post: 02-19-2010, 01:45 PM
  3. JAVA programming language
    By SmithJohnson in forum Programming
    Replies: 1
    Last Post: 02-19-2010, 12:52 PM
  4. Java programming
    By simona in forum General Internet Terms
    Replies: 0
    Last Post: 01-24-2009, 05:03 AM
  5. Java Programming
    By aiantin465 in forum Programming
    Replies: 0
    Last Post: 07-05-2008, 09:30 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48