<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    敬的世界

    常用鏈接

    統(tǒng)計

    最新評論

    Bitwise and Bit Shift Operators

    Bitwise and Bit Shift Operators
    The Java programming language also provides operators that perform bitwise and bit shift operations on integral types. The operators discussed in this section are less commonly used. Therefore, their coverage is brief; the intent is to simply make you aware that these operators exist.

    The unary bitwise complement operator "~" inverts a bit pattern; it can be applied to any of the integral types, making every "0" a "1" and every "1" a "0". For example, a byte contains 8 bits; applying this operator to a value whose bit pattern is "00000000" would change its pattern to "11111111".

    The signed left shift operator "<<" shifts a bit pattern to the left, and the signed right shift operator ">>" shifts a bit pattern to the right. The bit pattern is given by the left-hand operand, and the number of positions to shift by the right-hand operand. The unsigned right shift operator ">>>" shifts a zero into the leftmost position, while the leftmost position after ">>" depends on sign extension.

    The bitwise & operator performs a bitwise AND operation.

    The bitwise ^ operator performs a bitwise exclusive OR operation.

    The bitwise | operator performs a bitwise inclusive OR operation.

    The following program, BitDemo , uses the bitwise AND operator to print the number "2" to standard output.

    								class BitDemo {
         public static void main(String[] args) {
              int bitmask = 0x000F;
    	  int val = 0x2222;
    	  System.out.println(val & bitmask);  // prints "2"
         }
    
    						

    posted on 2009-05-14 17:43 picture talk 閱讀(383) 評論(0)  編輯  收藏 所屬分類: Java

    主站蜘蛛池模板: 手机看片国产免费永久| 特黄aa级毛片免费视频播放| 永久免费A∨片在线观看| 国产精品亚洲mnbav网站| 激情吃奶吻胸免费视频xxxx| 国产精品免费一级在线观看| 欧洲亚洲综合一区二区三区| 日本视频免费在线| 黄色毛片免费观看| 亚洲国产一区视频| 日韩免费高清播放器| 亚洲不卡中文字幕无码| 亚欧免费无码aⅴ在线观看| 亚洲国产精品线在线观看| 99在线观看视频免费| 久久亚洲最大成人网4438| 成年丰满熟妇午夜免费视频| 亚洲国产综合AV在线观看| 亚洲AV无码成人精品区大在线| 久久www免费人成精品香蕉| 亚洲v高清理论电影| 亚洲精品视频免费看| 亚洲综合激情五月丁香六月| 四虎永久免费影院| 久久国产一片免费观看| 99ri精品国产亚洲| 成年女性特黄午夜视频免费看| 精品无码专区亚洲| 亚洲精品无码AV人在线播放| 亚洲视频免费观看| 亚洲AV日韩AV一区二区三曲| 亚洲区小说区图片区| 91人成网站色www免费下载| 亚洲欧美国产精品专区久久| 亚洲精品天堂成人片?V在线播放| a级毛片免费播放| 中文字幕亚洲男人的天堂网络| 免费一级特黄特色大片在线观看| 两个人看的www高清免费视频| 亚洲成aⅴ人在线观看| 亚洲毛片网址在线观看中文字幕|