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

Which methods cannot be overridden in java?

0 Answers  


What is the difference between C++ & Java?

78 Answers   College School Exams Tests, HAL, SUN, Syntel, TCS, Wipro,


What do you mean by local variable and instance variable?

0 Answers  


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

0 Answers  


who was the founder of java

32 Answers   CTS, HCL, ProKarma,


In java, how we can disallow serialization of variables?

0 Answers  


write a program that list all permutations of ABCDEF in which A appears before B?

0 Answers   Nissan,


java is pure object-oriented programming language?why it is platform independent.

1 Answers  


What is the difference between hashmap and hashtable in java?

0 Answers  


what is j2se

3 Answers  


What are the Abstract Classes provided by Java?

5 Answers   Oracle,


Why should we use java?

1 Answers   IBM,


Categories