Splitting user input in Java -


I am writing a program that takes 3 or 5 arguments. The first is the string, the middle is / numbers, and the last one string. However, the last argument is surrounded by quotation marks, and it should be treated as a string. For example: Bob 1 2 3 "Jimmy John" must be [Bob, 1].

, 2, 3, Jimmy John] , not [Bob, 1, 2, 3, Jamie, John] . Thanks!

You said "logic," therefore you should have a command line argument.

public static zero main (last string [] argument) {object [] myArray = new object [arguments.length]; {MyArray = transformAsDesired (logic [index]) for (int index = 0; index & lt; arguments.length; ++ index); }}

apply Integers to convert the desired value to transformAsDesired Argument "Blame Blame" in diploid array one Will show in the form of the entry.


Comments