Do you mean somehting like
import java.util.Scanner;
import java.util.*;
import java.time.*;
import java.time.format.*;
public class Game
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
String name, birthday;
long age;
String answer;
do
{
System.out.println("To get started, enter your name.");
name = scan.nextLine();
System.out.println("Enter your Date Of Birth. (YYYY MM DD)");
birthday = scan.nextLine();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("uuuu MM dd", Locale.ENGLISH);
LocalDate dateofbirth = LocalDate.parse(birthday, formatter);
LocalDate now = LocalDate.now();
age = java.time.temporal.ChronoUnit.YEARS.between( dateofbirth , now );
System.out.println("Are you " + age);
answer = scan.nextLine();
} while ( ! answer.toUpperCase().equals("YES") );
System.out.println("Goodbye " + name );
}
}