Use if statements to compare the String to each of the desired Strings with the colors: "RED", "BLUE", etc.
When there is a match, assign the Color variable the associated Color value: Color.RED,...
Type: Posts; User: Norm
Use if statements to compare the String to each of the desired Strings with the colors: "RED", "BLUE", etc.
When there is a match, assign the Color variable the associated Color value: Color.RED,...
The value of Color._______ is set when the program is compiled. The code will need to use a variable that gets assigned a value depending on what the user types in.
--- Update ---
The variable...
The user needs to enter the type of data that the program is trying to read. The String "RED" is not a number: NumberFormatException
Or the program needs to be rewritten to read in a String and use...