Last active
March 15, 2021 10:01
-
-
Save coolsasindu/edbcbb1cfb95e2625e099594099bc753 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Shift_Operators { | |
public static void main(String args[]){ | |
int i = 2; | |
int result = i << 4; // 2 * 2* 2* 2 *2 32 | |
System.out.println(result); | |
int a = 32; | |
int result_a = a << 4; // 32 >>>>>> 2 * 2* 2* 2 *2 = 2 | |
System.out.println(result_a); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment