What should be the output

XY.compare(YX) > 0 ? 1:0;

what is the meaning of this

Your question is not clear enough. Please share the complete question.