import java.util.Scanner;
public class NewClass
{
// main method begins execution of Java application
public static void main( String args[] )
{
// create Scanner to obtain input from command window
Scanner input = new Scanner( System.in );
4
int number1; // first number to add
int number2; // second number to add
int sum; // sum of number1 and number2
System.out.print( "Enter first integer: " ); // prompt
number1 = input.nextInt(); // read first number from user
System.out.print( "Enter second integer: " ); // prompt
number2 = input.nextInt(); // read second number from user
sum = number1 + number2; // add numbers
System.out.printf( "Sum is %d\n", sum ); // display sum
} // end method main
} // end class Addition
packagesRaj Travels KUTTICHIRA.. March 20, 2013 at 11:36 AM
packagessujay May 31, 2011 at 11:45 AM
how can we set the path in the environmental variables?
colorpickermitali dash October 13, 2011 at 5:13 PM
sir,plz give me the code& solution coding of color picker and step by step procedure to use it in java
Fromraj November 3, 2011 at 3:18 PM
import java.util.Scanner; public class NewClass { // main method begins execution of Java application public static void main( String args[] ) { // create Scanner to obtain input from command window Scanner input = new Scanner( System.in ); 4 int number1; // first number to add int number2; // second number to add int sum; // sum of number1 and number2 System.out.print( "Enter first integer: " ); // prompt number1 = input.nextInt(); // read first number from user System.out.print( "Enter second integer: " ); // prompt number2 = input.nextInt(); // read second number from user sum = number1 + number2; // add numbers System.out.printf( "Sum is %d\n", sum ); // display sum } // end method main } // end class Addition
packagesRaj Travels KUTTICHIRA.. March 20, 2013 at 11:36 AM
it is really nice....
java packagesnikhil.s February 11, 2012 at 11:37 AM
i want know more adout the above topic.
Post your Comment