All the four access specifiers, Java supports, can be applied to variables – public,protected, default 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 default. Default means the specifier is not mentioned at all.
The list of modifiers are : public, protected,default,private,abstract,final, static.
The list of modifiers are : public, protected,default,private,abstract,final, static.