Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
VisibilityControl in Java

VisibilityControl in Java

Ratings: (0)|Views: 30|Likes:
Published by Tech_MX

More info:

Published by: Tech_MX on Sep 03, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPTX, PDF, TXT or read online from Scribd
See more
See less

09/03/2012

pdf

text

original

 
VISIBILITY CONTROL IN JAVA
 
ACCESS MODIFIERS
Visibility modifiers
also known as
access modifiers
 
can beapplied to the instance variables and methods within aclass.
Java provides the following access modifiers
PublicFriendly/Package (default)PrivateProtected
 
PUBLIC
 
ACCESS
Any variable or method is visible to the entire class inwhich it is defined.
What is we want to make it visible to all classes outsidethe current class??
This is possible by simply declaring the variable as ‘
 public
 
When no access modifier member
defaults
to a limited
version of public accessibility known as ‘
 friendly 
’ level of 
access. This is also known as
 package access
.
FRIENDLY ACCESS

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->