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 are the different access specifiers that can be used
by interfaces and abstract classes? can anyone give me
detailed description on this

Answer Posted / vishal arora

This question leads to two things
1. modifier for abstract class or interface
2. modifier for members of abstarct class or interface

For first in abstract class and interface we can have
public , protected and default and not private if it is top
level otherwise private also if it is nested

for point 2
in an interface every member variable is public and final
in an abstract class you can assign any modifier to member
variables

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between superclass and subclass?

1177


What happens when main () method is declared as private?

1145


What are different types of encoding?

1081


Is java a digit method?

1004


Does printwriter create a file?

963


What is an class?

1038


Can we create a class inside a class in java?

1086


What does the three dot emoji mean?

1124


Why generics are used in java?

1058


What is passing value java?

1064


Which package is imported by default?

1082


How do you add an element to a hashset in java?

1009


Is zero a natural number?

1038


Why do we use predicate in java?

1054


How does indexof work?

967