You should always post
the exact code; what you posted won't compile.
You should write a descriptive comment before each subroutine, saying what it does.
Which you haven't done. Look at line 32.
Line 61 is indented incorrectly.
Lines 54‑56 show several formatting errors; I shall leave you to count them.
What does line 52 mean? Why are you saying routines and subroutines, which are not Java® words? Please explain your choice of loop types.