Multiple Interface in Java
Multiple interface in java is an important topic in object oriented design. Please see an example of multiple interface in java below.
interface a
{void insurance ();
}
interface b
{
void trading ();
}
public class multiple interface implements a, b
{
public void insurance ()
{
System.out.println ("This is an example for multiple interfaces in java");
}
public void trading ()
{
System.out.println ("This is also an example for multiple interfaces in java");
}
}
No comments:
Post a Comment