Google

Thursday, August 16, 2007

sample program for adding two numbers in java

import java.lang.*;

class Sum

{

public Static voidmain(String args[]);

{ int x,y;

x=10;

y=20;

int z=x+y;

System.out.println("The sum of two numbers is "+z);

}

}

2 comments:

codes said...

hi gud code yaar keep it up

codes said...

good post yar .ok....
mahesh