Access modifiers in java:- Access modifiers decide that whether the class ,constructor,member or method will be accessible or not.simply access modifier define the accessibility. There are four types of modifier in java Access modifier ( private, default, protected and public ) Non-access modifier. ( static, abstract, synchronized, native, volatile, transient etc. ) Now we will discuses access modifier only. for your understanding I divide access modifier into to type a. class level modifier <class level > b. member level modifier.<member level> a.class level modifier -In class level Public and default modifiers are used. -In class only public modifier are written by-default default are applied. Public access modifier if we use public key word with class it will be accessible in every where.It has highly scope ...
Comments
Post a Comment