+ 1

dear friends. pleaae give short example to modifyer accesses .

21st Aug 2016, 12:25 AM
Asam Hussain
Asam Hussain - avatar
2 Réponses
+ 2
there as four access modifier, public and private, default, protected. default is accessible within the package if you any test package then it will be accessible within it. public has wider access means within and out of package. private it's most narrowest access modifier that has access with in the class. protected has access within the package and out of package to Inherited classes. public>protected>default>private
21st Aug 2016, 7:42 PM
sana shah
sana shah - avatar
+ 2
there are 3types of modifier which are often used public, private, protected public : in ths type of modifier u can use the variables or methods through the program protected : the variables and methods declared under this category cannot b used anywhere else in the program...It can b accessed only in block it is declared in private : the variables and methods declared under these cannot b accessed from another class or program...
20th Nov 2016, 12:30 PM
Prince Kumar
Prince Kumar - avatar