-
Junior Member
Class modifiers and member modifiers
I have seen the class with public or without modifiers and method with public, protected or private modifiers. I am confused how to decide modifiers for a class?
What is difference between class modifiers and member modifiers?
-
Junior Member
Re: Class modifiers and member modifiers
class modifiers are public,final,static(inner classes),abstract,default.
method modifiers public,private,protected,static,abstract,final
-
Junior Member
Re: Class modifiers and member modifiers
In classes there are two types one is top level and inner level.
For the top level class only five modifiers are allowed i.e. public, default, final, abstract, strictfp. Other than this modifiers are not allowed.
But for the inner classes public, private,protected, default, final, abstrct,strictfp,synchronized,static, and some other are applicable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules