When we give defination of interface method in the class why
method must be public???
Answers were Sorted based on User's Feedback
Answer / pradeep singh
because class which implements the interfaces if the
access modifiers are protected or private then we can not
override this metods. somethos must be publicand java there
is notmultiple inheritance
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / prakash
all methods in interfaces are public by default...
| Is This Answer Correct ? | 3 Yes | 3 No |
Why arraylist is used in java?
What is the meaning of 3 dots in java?
What do you know about the garbage collector?
How to change value in arraylist java?
What is the difference between call by reference and call by pointer?
What is a generic code?
how can we synchronize Hash map?
Does substring create a new object?
what is encapsulation in java? Explain
Which is the best way of exception handling?
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
Can we use string in the switch case?