It is a known thing that an interface can extend another interface in java. But why do we need to do it in the first place, can anyone give me a scenario or a reason to do it? Please make me undustand this. I cannot find the benefit of doing it?
For exactly the same reason you would want to extend a normal class.
Let's say you have an interface exposing the methods you can call on a Vehicle object. You can then define a Car interface which extends the Vehicle interface. Every Class which implements the Car interface would then have to implement the methods from the Car interface as well as the Vehicle interface.
You would have to use interfaces (or maybe abstract classes) for the above example as you can not create a Vehicle or a Car (it is not specific enough).
Men call me Jim. Women look past me to this tiny ad:
a bit of art, as a gift, that will fit in a stocking