Originally posted by sai donthneni:
what I am asking is, can i access the proected member in class C in package b without extending class B?
No.
A protected member of class A is only visible to classes in the same package as A or in the body of a subclass of A. If class C is not in the same package as class A and is not a subclass of class A then it does not have access to any protected member of class A.
Originally posted by sai donthneni:
what if i make class C extend class B? Will i be able access the protected member of class A which inturn is extended by class B?
Yes. In this case class C would be a subclass of class A and therefore have access to any protected member of class A.
[ April 12, 2006: Message edited by: Ken Blair ]