What does the pipe character do in a Java method call? -


i've seen 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 run this, 7.

can explain pipe in method call , how use properly?

the pipe in 3 | 2 bitwise inclusive or operator, returns 3 in case (11 | 10 == 11 in binary).


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -