Skip to content

Instantly share code, notes, and snippets.

@coolsasindu
Last active March 15, 2021 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coolsasindu/edbcbb1cfb95e2625e099594099bc753 to your computer and use it in GitHub Desktop.
Save coolsasindu/edbcbb1cfb95e2625e099594099bc753 to your computer and use it in GitHub Desktop.
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