JAVA Program to Accept Value from Command Line

88
Barontuts

 

JAVA Program to Accept Value from Command Line:


import java.io.*;
class cmd
{
 public static void main(String args[])
 {
     String a=args[0];
     int b=Integer.parseInt(args[1]);
  System.out.println(b);
  System.out.println(a);
 }
}

OUTPUT:

88
Barontuts

Leave a Reply

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

4 × 1 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.