Pretty new to Java but having a little trouble. I've done three different programs involving if statements and I can't figure out why I keep getting an error message "one or more projects are compiled with errors" on any of the programs. I've tested all three and each scenario and if i bypass the error they all run correctly. Here is one of the programs. Any help would be greatly appreciated thanks!
class Movies
{
public static void main (String []args)
{
Scanner scan = new Scanner(System.in);
int age, time;
double rate;
final double matineeChildren = 2.00;
final double regularChildren = 4.00;
final double matineeAdult = 5.00;
final double regularAdult = 8.00;
System.out.println("How old are you? ");
age = scan.nextInt();
System.out.println("What time is it? ");
time = scan.nextInt();
if (age < 12)
{
if (time < 1630)
rate = matineeChildren;
else
rate = regularChildren;
}
else
{
if (time < 1630)
rate = matineeAdult;
else
rate = regularAdult;
}
System.out.println("Your rate is " + rate);
}
}