// Helene Martin, CSE 142 // main is a method that takes an array of Strings as a parameter. // To pass in some values to the program, in jGRASP, go to // Build -> Run Arguments // Java splits what you pass in on white space import java.util.*; public class ProgramArgs { // it doesn't matter what the parameter is called! public static void main(String[] lolz) { System.out.println(Arrays.toString(lolz)); // This is how you could go from a String to an array of Strings // similar to what Java does with run arguments String test = "my cool arguments check it out"; String[] tokens = test.split("[ ]+"); System.out.println(Arrays.toString(tokens)); } }