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

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

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

    敬的世界

    常用鏈接

    統計

    最新評論

    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

    主站蜘蛛池模板: 亚洲AV无码专区国产乱码4SE | 日本视频一区在线观看免费| 国产91精品一区二区麻豆亚洲| 亚洲爆乳AAA无码专区| 性感美女视频在线观看免费精品 | 丰满妇女做a级毛片免费观看| 免费h成人黄漫画嘿咻破解版| 国产精品亚洲精品久久精品| 免费人成网站在线播放| 美景之屋4在线未删减免费| 亚洲?V无码成人精品区日韩| 一级做a爰片久久免费| 亚洲色欲一区二区三区在线观看| 中国国产高清免费av片| 久久久久亚洲精品无码系列| 1000部啪啪毛片免费看| 亚洲综合久久精品无码色欲| 日本免费人成黄页网观看视频 | 亚洲va中文字幕| 在线亚洲精品自拍| 一级毛片免费毛片一级毛片免费| 亚洲特级aaaaaa毛片| 成年女人男人免费视频播放 | 亚洲AV无码AV日韩AV网站| 国产在线观看免费完整版中文版 | 日本免费在线中文字幕| 亚洲国产精品综合一区在线| 四虎影院免费视频| 一级毛片在线免费视频| 亚洲人成影院在线| 成人毛片18岁女人毛片免费看| 全部一级一级毛片免费看| 亚洲国产精品国自产电影| 午夜视频免费成人| a毛片在线免费观看| 亚洲成A人片在线播放器| 久久精品国产亚洲5555| 97在线观看永久免费视频| 日日躁狠狠躁狠狠爱免费视频| 日韩精品一区二区亚洲AV观看| 日韩a级毛片免费视频|