为了实现Java最重要的思想:一次编写,到处运行。Sun公司创建了Java虚拟机。虚拟机抽象了底层的操作系统,解析编译后的Java代码。JVM(Java Virtual Machine)是JRE(Java Runtime Environment)的核心,用于运行Java代码,现在也被其他语言使用(Scala,Groovy,JRuby,Closure.)。
这篇文章的重点在于JVM规范中描述的...
Java 8 Date Time API
Java 8 Date Time API
Clock为instant,date,time 提供时间,是包含时区的。123456// get the current timeClock clock = Clock.systemDefaultZone();long t0 = clock.millis();//Clock中获得Instant,载将Instant转DateInstant instan...
关系型数据库工作原理
关系型数据库工作原理
英文原文:http://coding-geek.com/how-databases-work/
##概述
低层次和高层次的数据库组件
查询优化的过程
事务和缓冲池管理
O(1) vs O(n²)概念
时间复杂度是用来看看算法处理给定的数据需要多长时间。
时间复杂度的重点在于:随着数据的增加,需要处理的时间的变化。
O(1)的复杂度保持不变(常量)
O(log(...
Java 8 避免空检查
Java 8 避免空检查
概述null的发明者Tony Hoare在2009年致歉,表述了这个billion-dollar mistake。
I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the fi...
Java 面试题(2)
Java 面试题(2)
避免使用finalize()方法finalize()方法会被GC线程调用,但不保证执行。
finalize()方法不会像constructor()一样调用super finalize()。
finalize()方法抛出的异常会被GC忽略。
finalize()降低性能。
notify()和wait()为什么定义在Object class
notify(),...
Java 8 简明教程
Java 8 简明教程
“Java is still not dead–and people are starting to fingure that out”.
接口默认方法
java 8 可以在接口中使用default定义默认方法。可以多个
example:1234567interface Formula { double calculate(int a); de...