PROGRAM CODING:
class Addition{
public static void main(String args[])
{
int a=Integer.parseInt(args[0]);
int b=Integer.parseInt(args[1]);
int c;
c=a+b;
System.out.println("The addition of two value is"+c);
}
}
OUTPUT:
C:\Program Files (x86)\Java\jdk1.7.0_25\bin\Lokey>javac Addition.java
C:\Program Files (x86)\Java\jdk1.7.0_25\bin\Lokey>java Addition 5 6
The addition of two value is 11.
No comments:
Post a Comment