您的位置:首页 > 数据库 > Oracle

Oracle文档阅读指南(10g R2)

2013-10-10 12:27 381 查看
package mytest;

public class 位移 {

    public static void main(String[] args) {

        System.out.println(5<<3);

        System.out.println(5>>3);

        /**

         * 正数左移就是右边补零

         * 正数右移就是左边补零

         */

        System.out.println(-5<<3);

        System.out.println(-5>>1);

        System.out.println(-5>>100);

        /**

         * 负数左移就是右边补零

         * 负数右移就是左边补零(符号不会改变)

         */

       

        System.out.println(4&4);

        System.out.println(4&3);

        System.out.println(4&5);

        /**

         * 100

         * 011

         * ----

         * 000

         *

         * 100

         * 101

         * ----

         * 100

         *

         */

    }

}

 

 

/**result

 

a

40

0

-40

-3

-1

4

0

4

*/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: