Command line arguments are converted in integer

class cmdlntoint
{
public static void main (String args[])
{
int i = Integer.parseInt(args[0]);
int j = Integer.parseInt(args[1]);
System.out.println(“the sum of two command line argument is =” + (i+j));
}
}

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.