0

i work in GWT. The Devmode class in gwt has an interface in it called 'HostedModeOptions'. But HostedModeOptions extends more than 1 class like :

protected interface HostedModeOptions extends HostedModeBaseOptions, CompilerOptions {
    ServletContainerLauncher getServletContainerLauncher();

    String getServletContainerLauncherArgs();

    void setServletContainerLauncher(ServletContainerLauncher scl);

    void setServletContainerLauncherArgs(String args);
  }

How is this possible in java 7 ? As far as i know we cannot extend more than 1 class at a time in java 7. Can anyone explain please .

Rsh
  • 5
  • 4

1 Answers1

4

You cannot extend other more than one class however you can implement many interfaces. If you are developing an interfacing you can make use of other interface and can extend many other interfaces.

They are all interfaces and not classes.. An interface can extends many interfaces. This facility is there from very first version of Java.

If you have any doubts regarding ambiguity, below link might help a bit

Can an interface extend multiple interfaces in Java?

Suresh Atta
  • 120,458
  • 37
  • 198
  • 307