Answer Posted / janet
Public: Any thing declared as public can be accessed from
any where.
Private: Any thing declared as private can't be seen
outside of it's class.
Protected: Any thing declared as protected can be accessed
by classes in the same package and subclasses in the other
packages.
Default modifier: can be accessed only to classes in the
same package.
Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
What is static block?
State some situations where exceptions may arise in java?
What is the most important feature of java? What is an interface?
What do you mean by local variable and instance variable?
What is java argument list?
What do you mean Abstraction in java?
Can you give names of Container classes?
Explain a situation where finally block will not be executed?
What is the difference between an array and an array list?
Explain the reason behind ending a program with a system.exit(0)?
Is java type safe?
How to solve the problem of generating the unique hash keys with hash function?
Is array a class?
How do you declare a destructor in java?
What Is Composition?