import java.util.Scanner; public class FirstProg2 { public static void main(String[] a) { Scanner sc = new Scanner(System.in); System.out.println("what is your name:"); String n = sc.next(); System.out.println("what is your age:"); int age = sc.nextInt(); // I'm printing only ONE line, according to the age if (age <= 12) { // to the child System.out.println("Should we play lego?"); } if (age >= 13 && age <= 19) { // to the teenager System.out.println("Want to go to the hip-hop party?"); } if (age >= 20) { // to the adult System.out.println("No play - go back to work!"); } } }