Java - "Greater than" Operator

> Procedural Languages > Java

1 - About

The greater than operator (>)

3 - Data Type

3.1 - Primitive

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

3.2 - Reference

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

public interface Comparable<T> {
    public int compareTo(T o);
}
Advertising
lang/java/greater.txt · Last modified: 2017/02/12 21:05 by gerardnico