How to send Java problems
We know that Java support in the judge is bad. But if you want to try it, take this considerations into account.
The Java programs submitted must be in a single source code (not .class) file. Really, they are compiled and run as native applications using the gcj compiler. They must read and write the standard input/output, as the other languajes. Note that java::io use is restricted; this implies that some features (for example, to create a DataInputStream variable with System.in as argument, in order to use readLine to read strings from the standard input) are not available. Also, network and other functions are not allowed. Threads are also not ready. However, methods from math, util and some other common packages are authorized. If you find any useful function for a scientific program not available, please contact us about it.
The example program shows a ReadLn method to read the standard input (with a maximum line size setting). All programs must begin in a static main method in a Main class. Do not use public classes (even Main must be non public to avoid compile error). However, you can add and instance as many classes as needed.
View a sample Java program