This is my first on-my-own java project I have been working on using the Eclipse program, I have an issue, the eclipse is having an Error with my code somewhere, I can't figure out why.. maybe it's just because i'm a noob? idk, but anyhow, I am trying to make an age calculator only using the year you were born and the current year, (2012), so here's the code.. please help me figure out what's wrong and what I can do to fix it, thank you for your help!
import java.util.Scanner;
public class Detector {
public static void main(String[] args){
int number, answer, i = 2012;
Scanner age = new Scanner(System.in);
System.out.println("Enter your year of birth:");
number = age.nextInt();
answer = i - age;
System.out.println("You are/will be this age: " +answer);
}
}