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 different types of access modifiers?

Answer Posted / shekhar suchak

private:it can be access within the block or we can aslo say that within the class.

public:"every where,any where" just one line ans.

protected:it can be access within package and outside of package.but there should be inheritense.

default:it will be access within the package.

class can not be private and protected.its only default and public.we dont have to mention 'default' keywords it always be there,but invisible.

Thanks & Regards

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of super keyword in java?

972


Is void a data type in java?

921


What is an example of character?

1060


Explain about abstract classes in java?

984


What is the inheritance?

925


Explain different states of a thread in java?

1002


What are the ways in which a thread can enter the waiting state?

882


What is nextline method in java?

974


Define jre i.e. Java runtime environment?

959


What is the Scope of Static Variable?

1162


Does .length start 0 java?

955


What is parameters example?

967


How are the elements of a gridbaglayout organized in java programming?

935


What is implicit object in java?

1022


What is an interface in java? Explain

1078