import java.io.*; import java.text.*; public class program3 { //Precondition: Your intrepid professor has been pulled over by the State Trooper //Postcondition: Depends on how lucky she is! :-) static final int LIMIT=55; //constants must be at the class level, not in methods //not even in main() public static void main(String[] args) throws IOException { int speed; BufferedReader in =new BufferedReader (new InputStreamReader(System.in)); System.out.println("Do you know how fast you "+ "were driving Professor?"); speed=Integer.parseInt(in.readLine()); if (speed>LIMIT)//boolean expression { System.out.print("Pay the Ticket!\n"); System.out.println("You naughty person."); }//making a compound statement else System.out.println("Have a nice day!\n"); System.out.println("Drive Safely!"); } }