Today I came across a very different coding style of declaring int in Java, being curious I tried in IntelliJ and it's working but there is no explanation on Google how it's working.
int i = 1 | 2 | 3 | 4 | 5;
System.out.println("i = " + i);
The output is 7. Any explanation?