Skip to main content

Featured

Game Development Tutorials In Android

Game Development Tutorials In Android Hi Guys,                 We are shortly started Game Development Tutorials in Android Studio. So everyone supports me and share this blogs to your friends. Guys, At this time everyone is freely available to source code and we are provide a video for step by step game developments. you are learn free and feel free to support us. Guys, if you have any question to me, so feel free to comment us. I will try to answer all the question as long as possible.                                                     Thank's                                                                          ...

interface example program in java

Definitions

Interface : It's used to hide the implementation of the object from it's class. Interface provides a mechanism to achieve the multiple Inheritance in java. Java does not support multiple inheritance using interface we can achieve this goal in Java Programming Language.


Example Program :

interface myInt
{
   void In1();
   void In2();
}
class toInt implements myInt
{
  public void In1()
  {
     System.out.println("Welcome to In1 !!");
  }
  public void In2()
  {
     System.out.println("Interface 2 is Launched !!!!");
  }
  public static void main(String args[])
  {
     myInt obj = new toInt();
     obj.In1();
     obj.In2();
  }
}

Sava this file : toInt.java

Compile this file : javac toInt.java

Run this file : java toInt

Output : 

Welcome to In1 !!
Interface 2 is Launched !!!!


If you want to donate money if this information is useful to 
you :


If this information is important to you , and you want to , I will continue writing some more details of programming language, so click on the advertising, available on this page. This is motivate me for writing some more blogs.

Comments