摘要: import org.junit.Test; public class DemoFor { /* * for( 代码块1 ; 代码块2 ; 代码块3 ){ } * --------------------------------------- * 代码块1: 在for循环之前,只执行一次,什么代码都可以,也可以不写。 * 代码块2: boole... 阅读全文
posted @ 2017-12-13 16:09 迷失之路 阅读(154) 评论(0) 推荐(0) 编辑
摘要: @Test public void testName() throws Exception { // 手动创建 Short s1 = new Short((short) 129); Short s2 = new Short((short) 129); System.out.println(s1 == s2); // ... 阅读全文
posted @ 2017-12-13 15:24 迷失之路 阅读(144) 评论(0) 推荐(0) 编辑
摘要: @Test public void testName() throws Exception { /* * 负整数的二进制是怎么存的? * 在计算机中,负数以其正值的补码形式表达。 * 什么叫补码呢?这得从原码,反码说起。 * ----------------------------------... 阅读全文
posted @ 2017-12-13 14:55 迷失之路 阅读(1571) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://blog.sina.com.cn/s/blog_618199e60100ka5b.html 阅读全文
posted @ 2017-12-13 10:56 迷失之路 阅读(198) 评论(0) 推荐(0) 编辑
摘要: import org.junit.Test; /** * ^ : 按位异或 * ------------------------------------ * 按位异或,比较每个操作数的二进制位,相同置为0,不同置为1 */ public class Demo { @Test public void testName() throws Exception { ... 阅读全文
posted @ 2017-12-13 10:27 迷失之路 阅读(421) 评论(0) 推荐(0) 编辑