摘要: 语句:select deptno,ename, count(deptno) from emp GROUP BY deptno; 结果: 语句:select deptno,ename, count(comm) from emp GROUP BY deptno; 结果: 从两次结果看出count()是统 阅读全文
posted @ 2017-07-13 10:22 John·zhang 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 1.什么是程序计数器? 程序计数器是一块很小的内存,可以看做是当前线程所执行字节码的行号指示器 2.程序计数器的作用是什么? java通过线程轮流切换的方式来实现多线程,为了线程切换后能恢复到之前执行的位置 3.程序计数器的特点是什么? 每条线程都有自己的程序计数器,各线程互不影响,该内存区是线程私 阅读全文
posted @ 2017-07-07 11:40 John·zhang 阅读(213) 评论(0) 推荐(0) 编辑
摘要: public class Test1 { static{ System.out.println("执行静态初始化块test1..."); } { System.out.println("执行初始化块test1"); } public Test1(){ System.out.println("执行te 阅读全文
posted @ 2017-06-28 14:38 John·zhang 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-06-28 13:50 John·zhang 阅读(103) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { /* * 1.'中'是字符,'中国'不是字符 * 2.'中'中文字符占两个字节,'a'英文字符占一个字节 * 3.char 占用两个字节 * 4.byte 占用一个字节 */ byte a1 = 'b';// true 阅读全文
posted @ 2017-06-28 12:07 John·zhang 阅读(278) 评论(0) 推荐(0) 编辑