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

Write a program to find the greatest of three numbers in java?

0 Answers  


What is 'finally' method in Exceptions?

4 Answers  


What is natural ordering in java?

0 Answers  


What is fail fast in java?

0 Answers  


What is the exact difference in between Unicast and Multicast object ?

4 Answers   Accenture,


What are the special characters?

0 Answers  


Differentiate between the constructors and methods in java?

0 Answers  


What is a memory leak in java?

0 Answers  


What does escaping a character mean?

0 Answers  


What is the difference between && and & in java?

0 Answers  


What are instance variables?

0 Answers  


When should we create our own custom exception classes?

0 Answers  


Categories