Java tutorial
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); String answer = input.nextLine(); if ("yes".equals(answer)) { System.out.println("Yea!"); } else { System.out.println("No :("); } } }