Flatten Function In Java Using While Loops Khan