interface A{
public void meth1(int j, int k);
public void meth2(int x, int y, int z);
}
public class MyClass implements A{
int y,x,z;
public void meth1(int j, int k){
int result;
result=(j+k);
System.out.println("Sum Of The Integers is="+result);
}
public void meth2(int x,int y,int z) {
this.x=x;
this.y=y;
this.z=z;
System.out.println("Entered value of Integers is x="+x+" y="+y+" z="+z);
}
public static void main(String[] args){
MyClass mc=new MyClass();
mc.meth1(12,14);
mc.meth2(14,1,5);
}
}
public void meth1(int j, int k);
public void meth2(int x, int y, int z);
}
public class MyClass implements A{
int y,x,z;
public void meth1(int j, int k){
int result;
result=(j+k);
System.out.println("Sum Of The Integers is="+result);
}
public void meth2(int x,int y,int z) {
this.x=x;
this.y=y;
this.z=z;
System.out.println("Entered value of Integers is x="+x+" y="+y+" z="+z);
}
public static void main(String[] args){
MyClass mc=new MyClass();
mc.meth1(12,14);
mc.meth2(14,1,5);
}
}
No comments:
Post a Comment