I realized it was println like right after i posted that thank u so much for the fix.
I ran into another problem with the read method. Theres two of them. Which one should i replace.
I deleted both of them and used ur read method, but then I got a problem with the .close() in line 18 & 19