Codekru

Integer.compare() and Integer.compareUnsigned() methods

compare() method is used to compare two values numerically, whereas compareUnsigned() compares two values by treating them as unsigned. This post will look in detail at the Integer class’s compare() and compareUnsigned() methods. public static int compare(int x, int y) public static int compareUnsigned(int x, int y) Let’s look at both of them one by

Integer.compare() and Integer.compareUnsigned() methods Read More »

Wrapper Classes in Java

In this post, we will discuss the wrapper classes of Java in detail. Wrapper classes provide a mechanism to “wrap” primitive values in an object so that primitives can be used for the operations reserved for the objects, like being used in a map or Collections. The wrapper classes can be used in the process

Wrapper Classes in Java Read More »