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

Is there a way to increase the size of an array after its declaration?

1055


What do you mean by platform independence of Java?

1157


What are keywords in java?

1009


Is map sorted in java?

1070


What is a conditional statement explain with example?

1018


Explain about oops concepts.

1125


how does the run() method in runnable work? : Java thread

927


What is application system?

946


What is stringjoiner ?

965


What are methods in java?

1001


What is string data?

987


In the below example, how many string objects are created?

1047


What do you mean by pointer value and address?

1053


What is callable java?

983


What about member inner classes?

1096