❮ Previous Next ❯

Interface inheritance:

A class implements interface but one interface extends another interface.

Example

interface Simple
{
void display();
}
interface Simple1 extends Simple
{
void show();
}
class Demo implements Simple1
{
public void display()
{
System.out.println("JavaRace");
}
public void show()
{
System.out.println("Welcome to JavaRace");
}
}
class TestInterface
{
public static void main(String args[])
{
Demo d = new Demo();
d.display();
d.show();
}
}
Output

JavaRace
Welcome to JavaRace

❮ Previous Next ❯



  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved