The Foreign Function & Memory API in Java provides significantly easier access to functions in C libraries than the outdated ...
While certainly possible, this is not a practical method of recording such data. Suppose the program needed to record 100 scores? 100 variables would be required!