'else' without 'if'
807607Dec 4 2006 — edited Dec 5 2006Hi, i'm doin a simple if statement for my second assignment at uni and keep gettin a 'else' without 'if' error on line 21.
import java.util.Scanner;
class TheatreBookingSystem
{
public static void main (String[] args)
{
Scanner scan = new Scanner(System.in);
int age;
System.out.print("Welcome To the Theatre Booking System");
System.out.println("please Enter Customers Age:>");
age = scan.next();
if (age >= 18);
{
System.out.println("You can see the Film, Puppet Show, Sax Player and The Play");
}
else if (age < 18 && >= 15)
{
System.out.println("You Can See the puppet Show, Sax Player and The Show");
}
else (age =>12)
{
System.out.println("You can see the Sax Player");
}
if else
{
System.out.println("You can see the puppet show");
}
}
}
Any help would be appreciated