Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to access a method that it declared as protected?

Answers were Sorted based on User's Feedback



How to access a method that it declared as protected?..

Answer / ranganathkini

If a method is marked protected, only the subclass of that
class can access it. To make it accessible to other classes,
the subclass of that class can override the protected method
and the override can be marked as public making it
accessible to other classes.

Is This Answer Correct ?    2 Yes 0 No

How to access a method that it declared as protected?..

Answer / ravikiran(aptech mumbai)

a protected method can be accessed with in the same packege
and subclasses outside of the package

Is This Answer Correct ?    2 Yes 1 No

How to access a method that it declared as protected?..

Answer / bulbull

only thru inheritance

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is a ternary operator in java? What is an interface?

0 Answers  


Explain the difference between static and dynamic binding in java?

0 Answers  


What is files manifesting?

0 Answers  


What are bind parameters?

0 Answers  


What is Java Package and which package is imported by default?

0 Answers  


What is mean by collections in java?

0 Answers  


what is the use of datasource in core java?

3 Answers   Satyam,


How to sort a collection of custom Objects in Java?

0 Answers  


What is final?

0 Answers  


Why multiple inheritance is not supported by java?

0 Answers  


How can we create an immutable class in java?

0 Answers  


What are the major advantages of internal iteration over external iteration?

0 Answers  


Categories