Comparison operations compare two operands. The result of a comparison operation is always true or false, i.e. a Boolean value. In principle any type of operands can be compared, but the result might be doubtful, when comparing operands, which are not comparable (e.g. a collection with a string value).
When data types are not compatible, the right operand is converted into the type of the left operand. The way of comparing two operands depends on the type operation, which is determined depending on the type of the first operand.