There are two cases of using bitwise operator:
For boolean
boolean a = true;
boolean b= false;
boolean c = a|b; // Giving response after logical OR for booleans.
For integer
int a = 10;
int b = 20;
int c = a|b; // Giving response after bitwise OR for boolean equivalents of "a" and "b".
Both of the above cases are in compliance of http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.22.2.
Is the operator | overloaded?
I just intent to ask a very simple question: Is "|" overloaded or it performs same task of bitwise OR for both booleans (binary equivalents of course) and integer?
boolean? - millimoose|overloaded? Clearly it is insofar as it can be applied to different operand types, but you're saying as much in your question. Are you asking what the difference between the two is? Well you have the JLS open so it's right there, but|isn't short-circuiting. Are you asking about how to do bitwise-OR onbooleans? That distinction doesn't make sense for a data type that represents one bit. - millimoose