Sunday, April 21, 2013

Access Specifiers and Access Modifiers

All the four access specifiers, Java supports, can be applied to variables – public,protecteddefault and private. If the specifier is not mentioned, it takes default access. A local variable must be default only.The two access specifiers a class can accept are public or defaultDefault means the specifier is not mentioned at all.

The list of modifiers are : public, protected,default,private,abstract,final, static.


No comments:

Post a Comment