Tuesday 3 April 2012

SUM OF TWO NUMBER IN JAVA

class Sumoftwonumber {
public static void main(String args[])
{
int x = 10;
int y =20;
int z = x+y;
System.out.println("Sum of X & Y is " +z);
}
}

The OutPut will be Sum of X & Y is 30.

No comments:

Post a Comment