Command line Arguments Java

Ram Pothuraju
This program is for displaying the command line arguments in Java. 

class Argu 

public static void main(String args[]) 

int n=args.length; 
System.out.println("Number of Arguments are="+ n); 
System.out.println("The Arguments are="); 
for(int i=0;i<n;i++) 

We use the argument passed in the command line to show them in the loop. The arguments are passed to the main() in the form of string


Post a Comment


Post a Comment (0)