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 a class have multiple subclasses?
What is meant by class and object in java?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
What is bitwise complement?
write a program that list all permutations of ABCDEF in which A appears before B?
What is sorting algorithm in java?
What is the purpose of the wait(), notify(), and notifyall() methods in java programming?
Explain the importance of throws keyword in java?
How do you do a line break in java?
What is broken and continue statement?
what is meant wrapper classes?
What is double parsedouble in java?
What are different types of references?
Can you have two constructors in java?
What is the string function?