By calling method
public class a
{
void sum(int i,int k)
{
System.out.println("THe sum of the number="+(i+k));
}
}
class b
{
public static void main(String[] args)
{
a vc=new a();
vc.sum(10 , 20);
}
}