Results 1 to 3 of 3

Thread: Class modifiers and member modifiers

  1. #1
    Junior Member
    Join Date
    Jan 2008
    Answers
    1

    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?


  2. #2
    Junior Member
    Join Date
    Aug 2008
    Answers
    2

    Re: Class modifiers and member modifiers

    class modifiers are public,final,static(inner classes),abstract,default.

    method modifiers public,private,protected,static,abstract,final


  3. #3

    Smile 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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact