Command Line User Input in Java
This is a simple program to get Command line user input in java. Here we will get a string as input from the user and display it on the screen. This is very first program to get input from command line argument in java programming.
Get Command Line User Input in Java
1 2 3 4 5 6 7 8 | class first { public static void main(String str[]) { String s=String.valueOf(str[0]); System.out.println("your input is----------> "+s); } } |
Output
Check out our other Java Programming Examples