i have a porbrelm with one of my java applications
i have been trying to make a program wich caculates your avarage age,the code i used is:
class Age
{
public static void main(String[] args)
{
char n;
system.out.printIn("Type in the year of your birth and press [ENTER] to find out your avarge age.");
n =(char)System.in.read();
system.out.printIn("The system has detected you where born in " + n);
system.out.printIn("The system has detected your avarge age");
system.out.print("2005 - n = " + (2005 - n));}
}
}
i saved it as Age.java.
then i compiled it in command pormt but to my confusion there was a eroer,it said:
Age.java:12:'class' or 'interface' expected
}
>
Age.java:13:'class' or 'interface' expected
>
2 erors
when i typed > i mean it so its pointing upwards if you could tell me what i have done wrong i would be greatfull.