Is java faster than C++ ???

When I compare java solutions with other C++ solutions in "Accepted page" I sometimes see that java solutions are faster than C++ ones in terms of running time. For example for this question : https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/. Is that an actual running time or am I missing something? I am kind of confused, as I have always been thinking that java is way slower than C++ due to two-step compilation process. Or there is another possibility that I can think of(Java test cases are very, very smaller than others???)

Comments (5)