Advertisement
Vankata17

EQUALS name console

Jan 14th, 2020
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class StringColor {
  4.  
  5.  
  6.     public static void main(String[] args) {
  7.         Scanner scan = new Scanner(System.in);
  8.         String color = scan.nextLine();
  9. if(color.equals("green")){
  10.     System.out.println("BALKAN");
  11. }else if(color.equals("red")){
  12.     System.out.println("CSKA");
  13. }
  14.  
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement