Can somebody tell me isn’t ONLINE_JUDGE defined for CodeChef while submitting solution? If not then what is the exact Key?

It is defined for C / C++ for sure. Will check and enable for Java if not already present.

It is not defined for JAVA , yesterday i got TLE and when i removed debug statements, then i got AC.