what is the difference between the "protected and default"
modifiers?
Answer Posted / firoz
default can be accessable in same class & same package.
protected can be accessed in same class,same package and
subclass.
| Is This Answer Correct ? | 29 Yes | 26 No |
Post New Answer View All Answers
Can we overload final method in java?
Write a program to find maximum and minimum number in array?
How do you sort in descending order in java using collections sort?
Why can't you declare a class as protected?
What is * argv?
Why 1 is not a prime number?
What are the restrictions that are applied to the java static methods?
Differentiate between run time error and syntax error.
How variables are declared?
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
when you will synchronize a piece of your code? : Java thread
How to Sort Strings which are given in List and display in ascending order without using java api.
What is included in core java?
What is a generic type?
What is prime number in java?