Introduction
In Java, Integer
is a wrapper class that encapsulates a primitive data type int
. Integer
class provides various useful methods to perform operations on integer values. One of the methods is compare()
which is used to compare two int
values.