This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes interface B extends A Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "interface B extends A" Watch "interface B extends A" New topic
Author

interface B extends A

Sameera Abeysinghe
Ranch Hand

Joined: Nov 15, 2004
Posts: 104
Hi all
This is my q
We can extend only one class right ?

class A
class B extends A

As for my knowledge we can extend only one interface two right ?

interface A
interface B extends A

But is there a why to extend multiple interfaces ?
Please explain with examples !
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24081
    
  15

An interface can extend multiple interfaces

interface C extends B, A

and a class can implement multiple interfaces

class D implements B, A

Not sure there's anything to explain.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: interface B extends A
 
Similar Threads
Quession of anonymous inner classes
Interface doubt from K&B
Extending interface
What class must an inner class extend
Anonymous class