what are the different access specifiers that can be used
by interfaces and abstract classes? can anyone give me
detailed description on this
Answer Posted / vishal arora
This question leads to two things
1. modifier for abstract class or interface
2. modifier for members of abstarct class or interface
For first in abstract class and interface we can have
public , protected and default and not private if it is top
level otherwise private also if it is nested
for point 2
in an interface every member variable is public and final
in an abstract class you can assign any modifier to member
variables
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
What is the difference between superclass and subclass?
What happens when main () method is declared as private?
What are different types of encoding?
Is java a digit method?
Does printwriter create a file?
What is an class?
Can we create a class inside a class in java?
What does the three dot emoji mean?
Why generics are used in java?
What is passing value java?
Which package is imported by default?
How do you add an element to a hashset in java?
Is zero a natural number?
Why do we use predicate in java?
How does indexof work?