I understand that String args[]
inside the public static void main line,
is used to store arguments from the command line.
So is it possible to print what's inside args[]
?
I wrote code that prints from args[0]
what I entered in the scanner.
I know I can print what's inside "a" scanner but is it possible to print what's inside "b" ?
import java.util.Scanner;
public class lesson1 {
public static void main(String args[]){
Scanner a = new Scanner(System.in);
String b = args[0];
System.out.println(a);
}
}