Java Compiler is FLAWED!!

Write here if you have problems with your Java source code

Moderator: Board moderators

Post Reply
Experienced poster
Posts: 114
Joined: Wed Jul 30, 2003 10:30 pm
Location: Newfoundland, Canada (St. John's)

Java Compiler is FLAWED!!

Post by xbeanx »

I know that the java compiler the OJ is using is flawed.

I solved question 112 using java, and submitted it. I checked it against all test inputs, and compared output to an accepted program I have. Everything was the same, but I still got WA.

I tried every possible input, created an input generator and tested my program with 10000 inputs. My Java program matched the accepted one perfectly.

Yet still I got WA.

So I translated my Java program to C++, keeping the logic exactly the same. Again I tested the programs. This time, all the versions matched output (C++ accepted version, Java WA version, and C++ translated version). When I submitted my C++ file, it got accepted.

Given that my program was only about 70 lines, I know I translated it to C++ perfectly.

Also, to be noted, I compiled my JAVA file using gcj 2.96 (which is newer than the version used here) and ran the binary against all my test inputs and it matched perfectly.

So that's how I know the java compiler here is flawed. Users beware...!!

I haven't been able to find an older copy of gcj to try my program with it. :(

Also, this happened to me with SCUD BUSTERS. I rewrote my rejected program in C++ and it got accepted.
New poster
Posts: 7
Joined: Wed Aug 06, 2003 4:51 am


Post by farsight »

I agree w/ you. This has happened to me too. I got a C++ friend to translate my java code exactly! and it was accepted. I am also suspicious of some other WA I got, cause no other Java programmer solved it either.
This sucks.
New poster
Posts: 12
Joined: Wed Oct 29, 2003 8:05 pm

Post by Carthage »

Maybe they should replace the compiler with a newer version, or they should try Excelsior JET...
My ideas on solving programming problems are 91% common sense, practicality and luck, 8% pure knowledge, and 1% extreme Math.
New poster
Posts: 2
Joined: Sat Nov 22, 2003 1:35 am

Post by purinflash »

Yes, the Java compiler is definitely not working properly, first, it doesn't support all methods; second, I also submitted a few Java programs but they all don't work, despite the fact that they are working perfectly with the same output as the sample given! :evil:
Post Reply

Return to “Java”