Let\'s say I have this:
PrintStream out = System.out; Scanner in = new Scanner(System.in); out.print(\"Enter a number ... \"); int n = in.nextInt();
Try this....
String s = new SimpleDateFormat("YYYY").format(new Date(random_date_in_long)); // int i = Integer.parseInt(s)+n;