I have translated a similar Python program into Java code, and have added more replies from M8Ball, as well as better looking output, along with exception handling.
Check it out.This was an app that I made with XCode using Swift and other resources for the cube to spin when the user presses their device screen. I originally named it "My First Game" as you can see with all the files contained in this repository, but it would be better off named "Fidget Cube App."
Check it out.