I've seen the pipe character used in method calls in Java programs.
For example:
public class Testing1 {
public int print(int i1, int i2){
return i1 + i2;
}
public static void main(String[] args){
Testing1 t1 = new Testing1();
int t3 = t1.print(4, 3 | 2);
System.out.println(t3);
}
}
When I run this, I simply get 7
.
Can someone explain what the pipe does in the method call and how to use it properly?