Access specifier

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shoby
    New Member
    • Jul 2008
    • 9

    #1

    Access specifier

    public class A
    {
    ......
    void display()
    {
    ......
    }
    .......
    }

    private class B extends A
    {
    ........
    void display()
    {
    ....
    }
    ...
    }


    What will be the visibility or access specifier for the method display() in class B? why?
  • Brosert
    New Member
    • Jul 2008
    • 57

    #2
    This sounds like Homework....

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      What do you think is the answer? Why?

      Comment

      • shoby
        New Member
        • Jul 2008
        • 9

        #4
        I think the access specifier will be private in B since the access specifier for class B is private...


        This is not any homework...this question was asked in an interview that i attended...

        Comment

        Working...