public class TwoColors 10 { public static void main(String[] args) { Scanner in = new Scanner(System.in); 11 12 13 14 System.out.print("Enter your first favorite color: "); 15 16 // Step 2: Read in...


public class TwoColors<br>10 {<br>public static void main(String[] args)<br>{<br>Scanner in = new Scanner(System.in);<br>11<br>12<br>13<br>14<br>System.out.print(

Extracted text: public class TwoColors 10 { public static void main(String[] args) { Scanner in = new Scanner(System.in); 11 12 13 14 System.out.print("Enter your first favorite color: "); 15 16 // Step 2: Read in the next line of input and assign • it to a String variable color1 17 // 18 19 // Step 3: Trim spaces from both end and convert the // // 20 input to all lowercase and assign it back 21 22 to the same variable 23 24 System.out.print("Enter your second favorite color: "); 25 26 // Step 4: Read in the next line of input and assign 27 // it to a String variable color2 28 29 30 // Step 5: Trim spaces from both end and convert the // // 31 input to all lowercase and assign it back 32 33 to the same variable 34 35 // Step 6: Display a message according to the following: // 36 first color 37 second color message light blue 38 red That's wonderful! light blue 39 red That's even better! That's also great! 40 otherwise 41 42

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here