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 is javac in java?

1053


What is the difference between int and integer in java?

1077


Can we return null in java?

1216


What are data types in programming?

1036


Why generics are used in java?

1093


Explain the protected field modifier?

1148


What is the access scope of a protected method?

1076


what is a thread pool in java and why is it used?

1053


Where is const variable stored?

984


What is arrays fill in java?

1058


Which methods are used during serialization and deserialization process?

1035


What is jit compiler in java?

1175


Enlist few advantages of inheritance?

1125


What is binary search in java?

1026


What restrictions are placed on method overriding?

1238