Answer Posted / guest
Interface is similar to a class which may contain method's
signature only but not bodies and it is a formal set of
method and constant declarations that must be defined by
the class that implements it.
Interfaces are useful for:
a) Declaring methods that one or more classes are expected
to implement
b)Capturing similarities between unrelated classes without
forcing a class relationship.
c)Determining an object's programming interface without
revealing the actual body of the class.
| Is This Answer Correct ? | 15 Yes | 1 No |
Post New Answer View All Answers
Can we have any code between try and catch blocks?
Why javac is not recognized?
What is the purpose of a volatile variable?
What is the method to declare member of a class static?
What is a values collection view ?
What is the difference between form & report?
What is t type java?
Define interface in java?
Can you extend singleton class?
When the constructor of a class is invoked?
What is static in java?
What is a stringbuilder?
Is singleton class immutable?
Can we have multiple catch block for a try block?
what is enumset?