java | operator is for what?

后端 未结 8 1370
故里飘歌
故里飘歌 2021-01-25 11:14

What is the output of this java code and why ?

 int a = 5 | 3 ;
 System.out.println(a);
8条回答
  •  长发绾君心
    2021-01-25 11:45

    This is a bitwise operator, part of the nuts and bolts Java tutorial

    The output is the result of 'or'ing the bits in the binary representation of the numbers.

提交回复
热议问题