Program to multiply two number in Java

Java

class mul_num
{
public int mul (int a, int b)
{
return (a*b);
}
}
class mulnum
{
public static void main (String args[])
{
int a,b;
a=10;
b=23;
mul_num mulobj=new mul_num();
System.out.println(“multiplication=”+mulobj.mul(a,b));
}
}

Output::

Learningtak


please share with friends!!
Twitter
Facebook
LinkedIn
RSS
Follow by Email
Pinterest
Instagram

Leave a Reply

Your email address will not be published. Required fields are marked *