[Solved] how to accept values using command line argument in java [duplicate]
What have you tried? See this block for how to access the args array. You’ll need to provide more details for why you’re getting outofbounds exception, otherwise use this as a template. public static void main(String args[]) { for (int i = 0; i < args.length; i++) { System.out.println(“Argument #” + i + ” = … Read more