all elements shift left java code example Example: left shift in java int a=a<<n; //where n is the number of places a is shifted towards left.