Sample Programs in java

Java Example Program for Multiplication

[java]
/*java program for multiplication of a numbers*/
/**
*@author:Candidjava.com
*@Description:To calculate the multiples of two number using muliple operator
*/
public class Mul
{
public static void main(String[] args)
{
int a=12;
int b=20;
int c;
c=a*b;//use this line if find the multiples of a and b
System.out.println("c:"+c);// display the c
}
}

[/java]

Output:

c:240