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 do you know about the garbate collector?

1080


What happens when main () method is declared as private?

1184


What is an image buffer?

1029


Is array serializable java?

1045


What are the high-level thread states in java programming?

1105


Which list does not allow duplicates in java?

992


What is the properties class in java programming?

1053


What is the purpose of using bufferedinputstream and bufferedoutputstream classes?

1118


What does super keyword do?

1141


What are basic data types?

1164


Can we have try block without catch block?

1087


How can you traverse a linked list in java?

1186


What is the technique adopted to create an immutable class?

1186


Define "Access specifiers" in java.

1214


What is string in java?

1070