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
Define class?
Can inner class have constructor?
What is functional interface in javatpoint?
What is defined as false sharing in the context of multithreading?
What is finally block?
What are the differences between graph and tree?
Is java good for beginners?
What is a class object?
Why webdriver is an interface?
Can we have try without catch block?
Is nullpointerexception checked or unchecked?
What is a nonetype?
Are arrays immutable in java?
How do you sort objects in java?
Explain about join() method?