Answer:
Scanner console = new Scanner(System.in);
System.out.print("What color do you want? ");
String choice = console.next();
if (choice.equalsIgnoreCase("r")) {
System.out.println("You have chosen Red.");
}else if (choice.equalsIgnoreCase("b")) {
System.out.print("You have chosen Blue.");
}else if (choice.equalsIgnoreCase("g")) {
System.out.print("You have chosen Green.");
}
else{
System.out.print("Unknown color: " + choice);
}