Java - “Greater than”Operator

About

Data Type

Primitive

The greater than operator (>) applies only to primitive types such as short, int, double, long, float, byte, and char.

Reference

To compare objects, use a type parameter bounded by the Comparable<T> interface:

public interface Comparable<T> {
    public int compareTo(T o);
}

Powered by ComboStrap