Results 1 to 8 of 8
  1. #1
    shruthi1 is offline Member
    Join Date
    Oct 2011
    Posts
    4
    Rep Power
    0

    Default access methods of grandparent class

    Hi Guys,

    I wanted to know how to access the methods of grandparent class from the child class (when those methods in child class are overridden) using super keyword. Please help.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: access methods of grandparent class

    You can't, and if you want to do this, it suggests that perhaps a re-design is in order.

  3. #3
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default Re: access methods of grandparent class

    Did you not like the other answers you received In your Cross post?

  4. #4
    shruthi1 is offline Member
    Join Date
    Oct 2011
    Posts
    4
    Rep Power
    0

    Default Re: access methods of grandparent class

    I had this doubt as I was attending a Java training class, a student came up with this question, so we were asked to find an answer for the same. As 'super' is used to get the methods of parent class, how can super be manipulated to get the methods of grandparent class.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: access methods of grandparent class

    Quote Originally Posted by doWhile View Post
    Did you not like the other answers you received In your Cross post?
    I wish you warned me in advance so I wouldn't have wasted my time answering a question that's already been answered. Original poster, is your goal to go on as many do-not-help lists as possible?

  6. #6
    shruthi1 is offline Member
    Join Date
    Oct 2011
    Posts
    4
    Rep Power
    0

    Default Re: access methods of grandparent class

    Quote Originally Posted by Fubarable View Post
    I wish you warned me in advance so I wouldn't have wasted my time answering a question that's already been answered. Original poster, is your goal to go on as many do-not-help lists as possible?
    I needed an answer, so thought someone will know about it. And find some way in doing the same.

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: access methods of grandparent class

    Quote Originally Posted by shruthi1 View Post
    I needed an answer, so thought someone will know about it. And find some way in doing the same.
    That's fine, but next time let folks know in advance about any and all cross-posts. There's no sense in re-hashing that which has already been hashed. We are all volunteers and value our time. We like to help folks who respect this fact.

  8. #8
    shruthi1 is offline Member
    Join Date
    Oct 2011
    Posts
    4
    Rep Power
    0

    Default Re: access methods of grandparent class

    Quote Originally Posted by Fubarable View Post
    That's fine, but next time let folks know in advance about any and all cross-posts. There's no sense in re-hashing that which has already been hashed. We are all volunteers and value our time. We like to help folks who respect this fact.

    I am very sorry about that

Similar Threads

  1. Replies: 15
    Last Post: 09-21-2011, 01:25 AM
  2. Replies: 0
    Last Post: 04-04-2010, 10:06 AM
  3. How can I call abstract class methods from another class
    By srinivas2828 in forum New To Java
    Replies: 13
    Last Post: 03-12-2010, 02:33 PM
  4. Ask for help on Java access to protected methods
    By fangzhong in forum Advanced Java
    Replies: 3
    Last Post: 02-17-2009, 01:50 PM
  5. Replies: 1
    Last Post: 07-20-2008, 04:42 PM

Tags for this Thread

Posting Permissions

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