Sample Programs in java

Java Example Program for Division

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

[/java]

Output:
c:2