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.

Developing a Simple Java Program

public class MyfirstjavaProgram {

public static void main(String args[])
{
System.out.println("Hello Frnds...This is my first program");
}

}
Hi frnds....

No more theory only practicals in my blogs.

Your questions are very much welcome.

So lets start learning java.