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 access modifiers?



What is access modifiers?..

Answer / sumit pal singh

In java there are four type of access modifier.
1.private:It is accessible only within the class.
2.default:If you don't use any modifier then it is treated as default bydefault .it is accessible within package.
3.protected:The protected access modifier is accessible within package and outside the package but through inheritance only.
4.public:The public access modifier is accessible everywhere. It has the widest scope among all other modifiers.

The access Modifier in java specify the scope of data member,method,constructor and class.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Core Java Interview Questions

Differences between traditional programming language and object oriented programming language?

0 Answers  


why HashTable not allow null key and value

2 Answers   Crimson Logic,


What is java class writing rules?

1 Answers   Oracle,


What is method with example?

0 Answers  


Which sorting is best in java?

0 Answers  


What is blank final variable?

0 Answers  


What is sizeof () operator?

0 Answers  


What are hot spots in Java programming?

1 Answers  


Which access specifier can be used with class ?

0 Answers  


Which is dependent variable?

0 Answers  


What is pojo class in java?

0 Answers  


Is treeset sorted in java?

0 Answers  


Categories