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...

what is the difference between the "protected and default"
modifiers?

Answer Posted / firoz

default can be accessable in same class & same package.
protected can be accessed in same class,same package and
subclass.

Is This Answer Correct ?    29 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we overload final method in java?

1030


Write a program to find maximum and minimum number in array?

1043


How do you sort in descending order in java using collections sort?

953


Why can't you declare a class as protected?

1201


What is * argv?

1306


Why 1 is not a prime number?

1072


What are the restrictions that are applied to the java static methods?

1038


Differentiate between run time error and syntax error.

1190


How variables are declared?

1025


Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?

1129


when you will synchronize a piece of your code? : Java thread

1066


How to Sort Strings which are given in List and display in ascending order without using java api.

4505


What is included in core java?

1094


What is a generic type?

1051


What is prime number in java?

1040