Java Integer.rotateLeft(int i, int distance)
Syntax
Integer.rotateLeft(int i, int distance) has the following syntax.
public static int rotateLeft(int i, int distance)
Example
In the following code shows how to use Integer.rotateLeft(int i, int distance) method.
public class Main {
public static void main(String[] args) {
//from w w w . j a va 2 s . co m
System.out.println(Integer.rotateLeft(10,2));
}
}
The output:
The code above rotates value 10 to left for distance of 2.