Science, asked by prathiksha3473, 1 year ago

What is the actual use of interface in Java?

Answers

Answered by cutieeee10101
3
HEY MATE......

HERE IS UR ANSWER......❤❤

Interfaces are more flexible, because a class can implement multipleinterfaces. Since Java does not havemultiple inheritance, using abstract classes prevents your users from using any other class hierarchy. In general, prefer interfaces when there are no default implementations or state.

HOPE IT HELPS YOU AND MARK AS BRAINLIEST.........
Answered by shibam158
0
Interfaces are more flexible because a class can implement multiple interfaces.Since java does not have multiple inheritence using abstract classes prevent your users from using any other class hierarchy. In general,prefer interfaces when there are no default implementations or states.
Similar questions