WAP to implement addition of 2 numbers using command Line (using parseInt() method)

2 years ago
OOP Java

class Arg

{

public static void main(String args[])

{

int x,y,z; x=Integer.parseInt(args[0]);

y=Integer.parseInt(args[1]);

z=x+y;

System.out.println("Sum is:"+""+z);

}

}

 

0
Bijay Satyal
Nov 3, 2021
More related questions

Questions Bank

View all Questions