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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the steps in the jdbc connection?

1020


What are abstract methods in java?

1122


What do you know about the garbate collector?

1018


What are different types of encoding?

1081


Explain throw keyword in java?

1045


How does java pattern compile work?

963


What is the purpose of default constructor?

1000


State some situations where exceptions may arise in java?

1058


What access modifiers can be used for variables?

1148


What do you mean by append?

1072


Why does java doesnt suuport unsigned values?

2236


What is the requirement of thread in java?

1052


make a method which any number and any type of argument and print sum of that arguments.....

1818


What is a variable declaration?

978


What is the history of java?

995