Addition of Two Numbers

package Prog;


/**
 * The Class Addition.
 */
public class Addition
{

/**
* The main method.
*
*
*/
public static void main(String args[])
{
Addition a=new Addition();
a.sum();

}

/**
* Sum.
*/
public void sum()
{

int a,b;
a=10;
        b=20;
        int sum=a+b;
System.out.println(sum);

}
}

--------------------------------------------------------------------------------------------------------------------------

Output:
30

Post a Comment

0 Comments