If A Method Is Declared As Protected, Where May The Method Be Accessed

If A Method Is Declared As Protected, Where May The Method Be Accessed


  • 28 May, 2012

    a protected method can be overriden into all its sub classes (with-in any package).

    and you can call Object Instance.protectedMethodName() only with in the same package

    Comments Received:
    Please give your suggestions and feedback:
  • 29 Dec, 2011

    A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.