Social Icons

Friday 23 August 2013

Command line Input Java Program


class New
{
public static void main(String args[])
{

 int a = Integer.parseInt(args[0]);
 int b= Integer.parseInt(args[1]);

 int c=a+b;
 System.out.println("Addition of two no . is  "+c);
}


}


output:

               

e:\java_programs>java New 5 6
Addition of two no . is  11


No comments:

Post a Comment

 

Sample Text

Sample text

 
Just Programming Cse DriveReputation Management