Created
July 7, 2021 17:14
-
-
Save codingminecraft/b95bdadc1e9bb42c30355d869695dd5f to your computer and use it in GitHub Desktop.
Bitwise Operators
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 Main { | |
static int[] someArray = {0, 1, 2, 3, 4}; | |
public static void main(String args[]) { | |
System.out.println("SomeArray[0]: " + someArray[0]); | |
System.out.println("SomeArray[1]: " + someArray[1]); | |
System.out.println("SomeArray[2]: " + someArray[2]); | |
System.out.println("SomeArray[3]: " + someArray[3]); | |
System.out.println("SomeArray[4]: " + someArray[4]); | |
System.out.println(); | |
System.out.println("'0 | 1 | 2': " + (0 | 1 | 2)); | |
System.out.println("SomeArray[0 | 1 | 2]: " + someArray[0 | 1 | 2]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment