I had developed my solution to work as “java Main in.txt out.txt”, however I am receiving a “Wrong answer” message when a submit my solution.
In the FAQ I have found that I must test using java test < in.txt > out.txt, but I do not understand what is the purpose of “<” and “>”.
The FAQ says that “…< and > to redirect the streams” but that do not makes much sense, my Java program takes “<” and “>” as arguments as well.
Besides, in the Wiki, there is a sample for Java solutions:
java.io.BufferedReader r = new java.io.BufferedReader (new java.io.InputStreamReader (System.in));
while (!(s=r.readLine()).startsWith(“42”)) System.out.println(s);
And I do not see that they use the input parameter “< in.txt >” anywhere.