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.

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.