import java.io.*; import java.text.*; public class vfunction { static final int YEAR=2001; public static void main(String []args) throws IOException { int age; System.out.print("Please enter your age this year: "); BufferedReader in = new BufferedReader (new InputStreamReader(System.in)); //need this to read from the keyboard age=Integer.parseInt(in.readLine()); //take what user types and translate it into an int year_of_birth(age);//function call } public static void year_of_birth(int age) { int yob=YEAR-age; System.out.println("You were born in: "+yob); } }