Answer Posted / shekhar suchak
private:it can be access within the block or we can aslo say that within the class.
public:"every where,any where" just one line ans.
protected:it can be access within package and outside of package.but there should be inheritense.
default:it will be access within the package.
class can not be private and protected.its only default and public.we dont have to mention 'default' keywords it always be there,but invisible.
Thanks & Regards
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you know about the garbate collector?
What happens when main () method is declared as private?
What is an image buffer?
Is array serializable java?
What are the high-level thread states in java programming?
Which list does not allow duplicates in java?
What is the properties class in java programming?
What is the purpose of using bufferedinputstream and bufferedoutputstream classes?
What does super keyword do?
What are basic data types?
Can we have try block without catch block?
How can you traverse a linked list in java?
What is the technique adopted to create an immutable class?
Define "Access specifiers" in java.
What is string in java?