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 |
What are the advantages of encapsulation in java?
Difference between Web-based applications,Client- Server applications and Distributed applications?
What is the differnence between String Buffer and String builder despite having knowledge that String builder is faster than String Buffer and last one is threadsafe.please tell another important difference.
What is a private class in java?
Can you call one constructor from another if a class has multiple constructors?
Explain numeric promotion?
Why java is platform independent? Explain.
what is Dictionary? and what purpose it is used for?
What are the 8 data types in java?
What is the difference between == and === javascript?
What is the difference between Integer and int?
How to declare unique ArrayList ?