Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: JAva programing

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JAva programing

    I want to access base class method variable in derived class.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: JAva programing

    Variables locally defined in a method can not be accessed from another class.
    When a base class's method is overridden the new method can not get the variables defined in the overridden method.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: JAva programing

    Your want is well stated, but there could be misunderstandings. To be sure we understand, you should be able to show what you're trying to do in less than 20 lines of code. Try showing us through code.

Similar Threads

  1. problem of java programing
    By mahnaz in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 16th, 2013, 05:03 PM
  2. Java programing style
    By maple1100 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: January 5th, 2013, 05:24 PM
  3. Is AJAX related with java programing or .Net?
    By sagar124 in forum Java Theory & Questions
    Replies: 1
    Last Post: December 26th, 2012, 11:28 PM
  4. Java programing help plz!
    By qazwsx in forum Java Theory & Questions
    Replies: 1
    Last Post: July 21st, 2012, 07:01 PM
  5. java thread programing.
    By parisa in forum Member Introductions
    Replies: 1
    Last Post: July 26th, 2011, 01:38 PM