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