
Java Interface Static Methods
Program on Static Methods in interfaces
interface abc1
{
static void put(int x,int y)
{
System.out.println("Sum of 2nos "+(x+y));
}
}
class xyz1 implements abc1
{
public void put1(int x,int y)
{
System.out.println("Sub traction "+(x-y));
}
}
public class inter3 {
public static void main(String[] args)
{
xyz1 k=new xyz1();
//k.put(32,22); // not acessable
k.put1(43, 22);
abc1.put(43,3);
//xyz1.put(44,3);// not acessable
}
}