Witshaper is the Professional (Computing Skills, English Learning and Soft Skills) Skill Development Training Center. We provide Professional IT Courses and Soft Skill Training in Dehradun to Students, Employees and organization. Who wish to pursue a career in IT Technology. Witshaper is led by a motivated team of IT experts and Soft Skill Professionals. We provide high quality trainings. Our Emphasis is on giving the practical knowledge to the students, so that they will get to know in depth and never forget what they opt, we provide to the students real learning environment. Witshaper prepares students and professionals to be the part of this growing industry. Be a part of Witshaper and get your dreams successful

Wednesday, 20 May 2015

example of interface in java two add two integers

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);
}
}

No comments:

Post a Comment