I have learned so far that Java works faster with BufferedReader and PrintWriter, but I would like to improve my coding a bit further.
Considering all the loops, I guess there is no real difference except while loop may require one less variable, therefore being slightly faster.
I am wondering, is program behaving any differently in terms of speed if I put my code outside the main method, but still in the same class, which is then called within main method?
Thanks