Shift Operator Example: Left Shift in Java

Java Programming Language / Operators in java

1859

Program:

public class OperatorExample {   
    public static void main(String args[])
    {  
    System.out.println(10<<2);  
    System.out.println(10<<3);   
    System.out.println(20<<2);  
    System.out.println(15<<4);   
    }
}  

Output:

40
80
80
240

This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.