Java:Java快速入门
链接地址:http://www.cnblogs.com/happyframework/p/3332243.html
你好,世界!
源代码组织方式
Java程序由package+class组成,package对应目录的相对路径,class对应文件,如
E:\Workspaces\MyEclipse 10\JavaStudy\src\com\happyframework\javastudy\hello\Hello.java

1 package com.happyframework.javastudy.hello;
2
3 public final class Hello {
4 public static void hello(){
5 System.out.println("hello!");
6 }
7 }

关于class有如下几点规则:
- 文件的名字必须和class的名字一致(public级别的class名字)。
- 文件必须只包含一个public访问基本的class(可以包含多个非public级别的class)。
- package名字必须和目录一致。
入口方法
App.java
1 public class App {
2     public static void main(String[] args) {
3         com.happyframework.javastudy.hello.Hello.hello();
4     }
5 }
最终的项目结构

数据类型
8种原子类型
- 整数类型:byte、short、int和long。
- 小数类型:float和double。
- 字符类型:char。
- 布尔类型:bool。
除此之外的是interface、class和array。
小数类型的常量默认是double类型,声明float类型的常量需要使用F作为后缀。

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7             float age = 28.0F;
 8             System.out.println(age);
 9     }
10
11 }

运算符
- 算术运算符:+、-、*、/ 和 %,两个整数相除,结果还是整数。
- 赋值运算符:=、+=、-=、*=、/=、%=、&=、|=、~=、^=、<<=、>>= 、 >>>=、++ 和 --。
- 比较运算符:==、!=、<、<=、> 和 >=。
- 逻辑运算符:&&、|| 和 !。
- 位运算符:&、|、~、^、<<、>> 和 >>>。
字符串
String是拥有“值语义”的引用类型,字符串常量实现了“享元模式”,equals会按照内容进行比较,==按照地址比较。

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7         String x = "段光伟";
 8         String y = new String("段光伟");
 9
10         System.out.println(x.equals(y)); // true
11         System.out.println(x == y); // false
12     }
13
14 }

为了高效的修改字符串Java引入了StringBuffer。

1         {
2             StringBuffer sb =
3                     new StringBuffer()
4                     .append("段")
5                     .append("光")
6                     .append("伟");
7
8             System.out.println(sb.toString());
9         }

数组
声明语法
DataType[] name 或 DataType name[]。
初始化语法
DataType[] name = new DataType[length]。
DataType[] name = new DataType[] { element1, element2, ...elementn }。
DataType[] name = { element1, element2, ...elementn }。

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7         {
 8             String[] strs = { "段", "光", "伟" };
 9
10             for (String item : strs) {
11                 System.out.print(item);
12             }
13         }
14     }
15
16 }

多维数组
只有不等长多维数组DataType[][],没有DataType[xxx, xxx]。
控制结构
- 条件:if-else if-else、switch-case-default和三元运算符(?:)。
- 循环:while、do-while、for和foreach。
- Labeled block。

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7         task: {
 8             int age = 25;
 9
10             System.out.println("start");
11
12             if (age < 30) {
13                 break task;
14             }
15
16             System.out.println("end");
17         }
18     }
19 }

最近觉得label是个不错的东西,最起码多了一种选择。
方法
Java中所有的赋值和方法调用都是“按值“处理的,引用类型的值是对象的地址,原始类型的值是其自身。
Java支持变长方法参数。

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7         print("段光伟", "段光宇");
 8         print(new String[] { "段光伟", "段光宇" });
 9     }
10
11     private static void print(String... args) {
12         for (String item : args) {
13             System.out.println(item);
14         }
15     }
16 }

类

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7         Point point = new Point(100);
 8
 9         System.out.print(point);
10     }
11 }
12
13 class Point {
14     private int x = 0;
15     private int y = 0;
16
17     public Point(int x, int y) {
18         this.x = x;
19         this.y = y;
20     }
21
22     public Point(int x) {
23         this(x, x);
24     }
25
26     public String toString() {
27         return "(x:" + this.x + ",y:" + this.y + ")";
28     }
29 }

注意:调用自身的构造方法是用this(xxx,xxx,...)来完成,且必须位于第一行。
静态成员
Java中类似静态构造方法的结构,称之为:静态初始化代码块,与之对应的是实例初始化代码块,见下例:

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7         System.out.println(Point.getValue());
 8         System.out.println(new Point());
 9     }
10 }
11
12 class Point {
13     private static int value = 0;
14
15     public static int getValue() {
16         return value;
17     }
18
19     static {
20         value++;
21     }
22
23     static {
24         value++;
25     }
26
27     private int x = 0;
28     private int y = 0;
29
30     {
31         this.x = 10;
32     }
33
34     {
35         this.y = 10;
36     }
37
38     public String toString() {
39         return "(x:" + this.x + ",y:" + this.y + ")";
40     }
41 }

继承
继承使用 extends,抽象类和抽象方法使用abstract声明,向下转型使用 (ChildType)instance,判断是否是某个类型使用 instanceof,见下例:

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7         printAnimal(new Animal());
 8         printAnimal(new Dog());
 9     }
10
11     private static void printAnimal(Animal animal) {
12         if(animal instanceof Dog){
13             System.out.println("I am a " + (Dog) animal);
14         }
15         else
16         {
17             System.out.println("I am an " + animal);
18         }
19     }
20 }
21
22 class Animal {
23     public String toString() {
24         return "Animal";
25     }
26 }
27
28 class Dog extends Animal {
29     public String toString() {
30         return "Dog";
31     }
32 }

重写
Java中的重写规则比较灵活,具体如下:
- 除了 private 修饰之外的所有实例方法都可以重写,不需要显式的声明。
- 重写的方法为了显式的表达重写这一概念,使用 @Override进行注解。
- 重写的方法可以修改访问修饰符和返回类型,只要和父类的方法兼容(访问级别更高,返回类型更具体)。
- 可以使用final将某个方法标记为不可重写。
- 在构造方法中使用 super(xxx, xxx)调用父类构造方法,在常规实例方法中使用 super.method(xxx, xxx)调用父类方法。
- Java不支持覆盖(new)。

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7         Animal animal = new Animal();
 8         Animal dog = new Dog();
 9
10         animal.say();
11         dog.say();
12
13         animal.eat(animal);
14         dog.eat(dog);
15
16         System.out.println(animal.info());
17         System.out.println(dog.info());
18     }
19 }
20
21 class Animal {
22     private String name = "Animal";
23
24     protected void say() {
25         System.out.println("Animal" + " " + this.name);
26     }
27
28     public void eat(Animal food) {
29         System.out.println("Animal eat " + food);
30     }
31
32     public Object info() {
33         return "Animal";
34     }
35
36     @Override
37     public String toString() {
38         return "Animal";
39     }
40 }
41
42 class Dog extends Animal {
43     private String name = "Dog";
44
45     @Override
46     public final void say() {
47         System.out.println("Dog" + " " + this.name);
48     }
49
50     @Override
51     public final void eat(Animal food) {
52         super.eat(food);
53
54         System.out.println("Dog eated");
55     }
56
57     @Override
58     public final String info() {
59         return "Dog";
60     }
61
62     @Override
63     public final String toString() {
64         return "Dog";
65     }
66 }

包
包的名字和项目路径下的目录路径相对应,比如:项目路径为:C:\Study,有一个Java源文件位于:C:\Study\com\happyframework\study\App.java,那么App.java的包名字必须为:com.happyframework.study,且 App.java 的第一行语句必须为:package com.happyframework.study。
Java支持三种导入语法:
- 导入类型:import xxx.xxx.xxxClass。
- 导入包:import xxx.xxx.xxx.*。
- 导入静态成员:import static xxx.xxx.*。

1 import static util.Helper.*;
2
3 public class Program {
4
5 /**
6 * @param args
7 */
8 public static void main(String[] args) {
9 puts("段光伟");
10 }
11 }

访问级别
Java支持四种访问级别:public、private、protected 和 default(默认),类型和接口只能使用public 和 default,成员和嵌套类型可以使用所有,下面简单的解释一下 protected 和 default。
- protected 修饰过的成员只能被自己、子类和同一个包里的(不包括子包)其他类型访问。
- default 修改过的类型或成员只能被自己和同一个包里的(不包括子包)其他类型访问。
嵌套类
Java支持如下几种嵌套类:
- nested class,定义在类型内部的类型。
- static nested class,使用 static 声明的 nested class,static nested class 可以访问所有外部类的静态成员。
- inner class,没有使用 static 声明的 nested class,inner class 可以访问所有外部类的实例成员,inner class 不能定义静态成员。
 
代码示例

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7         OuterClass outer = new OuterClass();
 8         OuterClass.InnerClass inner = outer.new InnerClass();
 9         OuterClass.InnerClass.InnerInnerClass innerInner = inner.new InnerInnerClass();
10         outer.show();
11         inner.show();
12         innerInner.show();
13
14         OuterClass.StaticNestedClass staticNested=new OuterClass.StaticNestedClass();
15         OuterClass.StaticNestedClass.StaticNestedNestedClass staticNestedNested=new OuterClass.StaticNestedClass.StaticNestedNestedClass();
16
17         staticNested.show();
18         staticNestedNested.show();
19     }
20 }
21
22 class OuterClass {
23     int x = 1;
24     static int i = 1;
25
26     void show() {
27         System.out.println(x);
28         System.out.println(i);
29     }
30
31     class InnerClass {
32         int y = 2;
33
34         void show() {
35             System.out.println(x);
36             System.out.println(y);
37         }
38
39         class InnerInnerClass {
40             int z = 3;
41
42             void show() {
43                 System.out.println(OuterClass.this.x);
44                 System.out.println(y);
45                 System.out.println(z);
46             }
47         }
48     }
49
50     static class StaticNestedClass {
51         static int j = 2;
52
53         void show() {
54             System.out.println(i);
55             System.out.println(j);
56         }
57
58         static class StaticNestedNestedClass {
59             static int k = 3;
60
61             void show() {
62                 System.out.println(i);
63                 System.out.println(j);
64                 System.out.println(k);
65             }
66         }
67     }
68 }

特殊的inner class:local class

 1 public class LocalClassExample {
 2
 3     static String staticValue = "static value";
 4     String instanceValue = "instance value";
 5
 6     public void test() {
 7
 8         final String finalLocalValue = "final local value";
 9
10         class LocalClass {
11             void test() {
12                 System.out.println(staticValue);
13                 System.out.println(instanceValue);
14                 System.out.println(finalLocalValue);
15             }
16         }
17
18         LocalClass local = new LocalClass();
19         local.test();
20     }
21 }

除了inner class的规则之外,local class可以访问局部final变量,在Java8中有更多的改进。
特殊的local class:anonymous class

 1 public class Program {
 2
 3     /**
 4      * @param args
 5      */
 6     public static void main(String[] args) {
 7         execute(new Action() {
 8             @Override
 9             public void execute() {
10                 System.out.println("执行业务逻辑");
11             }
12         });
13     }
14
15     static void execute(Action action) {
16         System.out.println("事物开始");
17         action.execute();
18         System.out.println("事物结束");
19     }
20 }
21
22 interface Action {
23     void execute();
24 }

常量
不废话了,直接看代码:

 1 public final class Program {
 2     static final String STATIC_CONSTANTS = "STATIC_CONSTANTS";
 3     final String INSTANCE_CONSTANTS = "INSTANCE_CONSTANTS";
 4
 5     public static void main(String[] args) {
 6         final String LOCAL_CONSTANTS = "LOCAL_CONSTANTS";
 7
 8         System.out.println(STATIC_CONSTANTS);
 9         System.out.println(new Program().INSTANCE_CONSTANTS);
10         System.out.println(LOCAL_CONSTANTS);
11         new Program().test("PARAMETER_CONSTANTS");
12     }
13
14     public final void test(final String msg) {
15         System.out.println(msg);
16     }
17 }

有一点需要注意的是:只有一种情况Java的常量是编译时常量(编译器会帮你替换),其它情况都是运行时常量,这种情况是:静态类型常量且常量的值可以编译时确定。
接口
Java的接口可以包含方法签名、常量和嵌套类,见下例:

 1 public final class Program {
 2     public static void main(String[] args) {
 3         Playable.EMPTY.play();
 4
 5         new Dog().play();
 6     }
 7 }
 8
 9 interface Playable {
10     Playable EMPTY = new EmptyPlayable();
11
12     void play();
13
14     class EmptyPlayable implements Playable {
15
16         @Override
17         public void play() {
18             System.out.println("无所事事");
19         }
20
21     }
22 }
23
24 class Dog implements Playable {
25
26     @Override
27     public void play() {
28         System.out.println("啃骨头");
29     }
30
31 }

枚举
Java枚举是class,继承自java.lang.Enum,枚举中可以定义任何类型可以定义的内容,构造方法只能是private或package private,枚举成员会被编译器动态翻译为枚举实例常量,见下例:

 1 public final class Program {
 2     public static void main(String[] args) {
 3         System.out.println(State.ON);
 4         System.out.println(State.OFF);
 5
 6         for (State item : State.values()) {
 7             System.out.println(item);
 8             System.out.println(State.valueOf(item.name()));
 9         }
10     }
11 }
12
13 enum State {
14     ON(1), OFF(0);
15
16     int value = 1;
17
18     State(int value) {
19         this.value = value;
20     }
21 }

调用枚举的构造方法格式是:常量名字(xxx, xxx),如果构造方法没有参数只需要:常量名子,如:
1 enum State {
2     ON, OFF
3 }
异常
Java中的异常分为checked和unchecked,checked异常必须声明在方法中或被捕获,这点我觉得比较好,必定:异常也是API的一部分,见下例:

 1 public final class Program {
 2     public static void main(String[] args) {
 3         try {
 4             test();
 5         } catch (Exception e) {
 6             System.out.println(e.getMessage());
 7         }
 8     }
 9
10     public static void test() throws Exception {
11         throw new Exception("I am wrong!");
12     }
13 }

所有继承Exception的异常(除了RuntimeException和它的后代之外)都是checked异常。
装箱和拆箱
Java提供了原始类型对应的引用类型,在1.5之后的版本还提供了自动装箱和自动拆箱,结合最新版本的泛型,几乎可以忽略这块。

1 import java.util.*;
2
3 public final class Program {
4 public static void main(String[] args) {
5 ArrayList list = new ArrayList();
6
7 list.add(1);
8 int item1 = (Integer) list.get(0);
9
10 System.out.println(item1);
11 }
12 }

注意:自动装箱和自动拆箱是Java提供的语法糖。
泛型
Java的泛型是编译器提供的语法糖,官方称之为:类型参数搽除,先看一下语法,然后总结一点规律:
泛型方法
测试代码

 1     static <T> void puts(T msg) {
 2         println(msg);
 3     }
 4
 5     static void println(Object msg) {
 6         System.out.println("Object:" + msg);
 7     }
 8
 9     static void println(String msg) {
10         System.out.println("String:" + msg);
11     }

调用泛型方法
1         System.out.println("generic method test");
2         puts("hello");
3         Program.<String> puts("hello");
输出的结果是
1 generic method test
2 Object:hello
3 Object:hello
泛型类
测试代码

1 class TestGenericClass<T> {
2     T value;
3
4     void setValue(T value) {
5         this.value = value;
6     }
7 }

调用代码
1         System.out.println("generic class test");
2         System.out.println(t.value);
输出结果
1 generic class test
2 1
泛型接口
测试代码

 1 interface TestInterface<T> {
 2     void test(T item);
 3 }
 4
 5 class TestInterfaceImp1 implements TestInterface<String> {
 6
 7     @Override
 8     public void test(String item) {
 9         System.out.println(item);
10     }
11 }
12
13 class TestInterfaceImp2<T> implements TestInterface<T> {
14
15     @Override
16     public void test(T item) {
17         System.out.println(item);
18     }
19 }

调用代码

 1         System.out.println("generic interface test");
 2         TestInterface<String> testInterface1 = new TestInterfaceImp1();
 3         testInterface1.test("hi");
 4         for (Method item : testInterface1.getClass().getMethods()) {
 5             if (item.getName() == "test") {
 6                 System.out.println(item.getParameterTypes()[0].getName());
 7             }
 8         }
 9
10         TestInterface<String> testInterface2 = new TestInterfaceImp2<>();
11         testInterface2.test("hi");
12         for (Method item : testInterface2.getClass().getMethods()) {
13             if (item.getName() == "test") {
14                 System.out.println(item.getParameterTypes()[0].getName());
15             }
16         }

输出结果

1 generic interface test
2 hi
3 java.lang.String
4 java.lang.Object
5 hi
6 java.lang.Object

类型参数约束
测试代码

 1 class Animal {
 2 }
 3
 4 class Dog extends Animal {
 5 }
 6
 7 class Base<T extends Animal> {
 8     public void test(T item) {
 9         System.out.println("Base:" + item);
10     }
11 }
12
13 class Child extends Base<Dog> {
14
15     @Override
16     public void test(Dog item) {
17         System.out.println("Child:" + item);
18     }
19 }

调用代码

1         System.out.println("bounded type parameters test");
2         Base<Dog> base = new Child();
3         base.test(new Dog());
4         for (Method item : base.getClass().getMethods()) {
5             if (item.getName() == "test") {
6                 System.out.println(item.getParameterTypes()[0].getName());
7             }
8         }

输出结果
1 bounded type parameters test
2 Child:Dog@533c2ac3
3 Dog
4 Animal
类型搽除过程
- 将泛型定义中的类型参数去掉。
class Base {
 public void test(T item) {
 System.out.println("Base:" + item);
 }
 }
- 将T换成extends指定的约束类型,默认是Object。
1 class Base {
 2 public void test(Animal item) {
 3 System.out.println("Base:" + item);
 4 }
 5 }
- 如果有非泛型类型继承或实现了泛型基类或接口,而且进行了重写,根据情况,编译器会自动生成一些方法。
 1 class Child extends Base {
 2 @Override
 3 public void test(Animal item) {
 4 this.test((Dog)item);
 5 }
 6
 7 public void test(Dog item) {
 8 System.out.println("Child:" + item);
 9 }
 10 } 
- 根据泛型参数的实际参数搽除调用代码。
 1 System.out.println("bounded type parameters test");
 2 Base base = new Child();
 3 base.test(new Dog());
 4 for (Method item : base.getClass().getMethods()) {
 5 if (item.getName() == "test") {
 6 System.out.println(item.getParameterTypes()[0].getName());
 7 }
 8 } 
这里说的不一定正确,特别是Java泛型的约束支持&(如:可以约束实行多个接口),不过过程估计差别不大,我没有看Java语言规范,这里只是大概的猜测。
备注
这几天完成了Java基本语法的学习,关于一些高级特性在后面再慢慢总结,如:运行时进程模型、类型加载机制、反射、注解、动态代理等。
Java:Java快速入门的更多相关文章
- Java Web快速入门——全十讲
		Java Web快速入门——全十讲 这是一次培训的讲义,就是我在给学生讲的过程中记录下来的,非常完整,原来发表在Blog上,我感觉这里的学生可能更需要. 内容比较长,你可以先收藏起来,慢慢看. 第一讲 ... 
- JAVA WEB快速入门之从编写一个基于SpringBoot+Mybatis快速创建的REST API项目了解SpringBoot、SpringMVC REST API、Mybatis等相关知识
		JAVA WEB快速入门系列之前的相关文章如下:(文章全部本人[梦在旅途原创],文中内容可能部份图片.代码参照网上资源) 第一篇:JAVA WEB快速入门之环境搭建 第二篇:JAVA WEB快速入门之 ... 
- JAVA WEB快速入门之从编写一个基于SpringMVC框架的网站了解Maven、SpringMVC、SpringJDBC
		接上篇<JAVA WEB快速入门之通过一个简单的Spring项目了解Spring的核心(AOP.IOC)>,了解了Spring的核心(AOP.IOC)后,我们再来学习与实践Maven.Sp ... 
- JAVA WEB快速入门之通过一个简单的Spring项目了解Spring的核心(AOP、IOC)
		接上篇<JAVA WEB快速入门之从编写一个JSP WEB网站了解JSP WEB网站的基本结构.调试.部署>,通过一个简单的JSP WEB网站了解了JAVA WEB相关的知识,比如:Ser ... 
- JAVA WEB快速入门之从编写一个JSP WEB网站了解JSP WEB网站的基本结构、调试、部署
		接上篇<JAVA WEB快速入门之环境搭建>,在完成了环境搭建后(JDK.Tomcat.IDE),现在是万事具备,就差写代码了,今天就来从编写一个JSP WEB网站了解JSP WEB网站的 ... 
- 如何让一个Java新手快速入门?
		问题中问到如何让java新生快速入门,既然想快速入门的话那最简单粗暴的方法就是多看视频,加上跟着视频敲代码,刚开始可能不知道是什么意思,敲得多了就慢慢知道是什么意思了. 刚开始建议在网上找那种结合自己 ... 
- java 多线程 快速入门
		------------恢复内容开始------------ java 多线程 快速入门 1. 进程和线程 什么是进程? 进程是正在运行的程序它是线程的集合 进程中一定有一个主线程 一个操作系统可以有 ... 
- 没有基础的初学者学java怎样快速入门?超全的学习路线图
		现在地球人都知道互联网行业工资高,上万都是小case,不值一提.可是对于大部分人来说,工资七八千都算很难了.那我也想学java,当程序员,赚大钱.可是作为一个初学者,怎样才可以快速入门呢?早点入门就可 ... 
- java框架--快速入门
		spring快速入门 1.创建项目 1.1创建项目文件夹 1.2启动idea ->文件->打开->点击创建的项目文件夹 1.3右键创建 ... 
- JAVA WEB快速入门之环境搭建
		前言 我是一直致力于:.NET技术栈.WEB前端.架构设计相关的开发与管理工作,但因国内大环境影响及公司技术方向发生转变(由.NET全部转为JAVA),需要熟练掌握JAVA WEB相关的知识,故我也得 ... 
随机推荐
- Java学习笔记51:数组转ArrayList和ArrayList转数组技巧
			ArrayList转数组: public class Test { public static void main(String[] args) { List<String> list = ... 
- Trie树:应用于统计和排序
			Trie树:应用于统计和排序 1. 什么是trie树 1.Trie树 (特例结构树) Trie树,又称单词查找树.字典树,是一种树形结构,是一种哈希树的变种,是一种用于快速检索的多叉树结构 ... 
- UVALive 5102 Fermat Point in Quadrangle 极角排序+找距离二维坐标4个点近期的点
			题目链接:点击打开链接 题意: 给定二维坐标上的4个点 问: 找一个点使得这个点距离4个点的距离和最小 输出距离和. 思路: 若4个点不是凸4边形.则一定是端点最优. 否则就是2条对角线的交点最优,能 ... 
- ArcGIS Engine 改变线IPolyline的方向
			有时候需要改变一下线的方向来组成要要的图形,可以按一下方法来变换一下. 如果看官有好的方法的话,请不吝贴上为谢! private IPolyline ChangeDirection(IPolyline ... 
- vim插件配置(一)
			vim代码自动显示提示代码插件:AutoComplPop: 代码(普通变量函数) c/c++代码(类的 . , ->, :: 操作符)的自动补全插件: OmniCppComplete 
- c# datagridviewcomboboxcell值无效的解决办法
			一直认为是数据库存储的数据和datagridviewcomboboxcell对不上导致,今天碰到两者对应上了,预览的时候还是提示错误, 查看了下网上其他大神的解决方法,是数据库字段类型有误,查看了下, ... 
- MFC、C++ 、Windows编程高手
			cnblogs: DoubleLi 1. DoubleLi 白手起家Win32SDK应用程序 http://www.cnblogs.com/lidabo/p/3450178.html#_Toc309 ... 
- 【STL__set_的应用】
			1.关于set C++ STL 之所以得到广泛的赞誉,也被很多人使用,不只是提供了像vector, string, list等方便的容器, 更重要的是STL封装了许多复杂的数据结构算法和大量常用数据结 ... 
- redis(四)redis与Mybatis的无缝整合让MyBatis透明的管理缓存
			redis的安装 http://liuyieyer.iteye.com/blog/2078093 redis的主从高可用 http://liuyieyer.iteye.com/blog/207809 ... 
- YARN & HDFS2 安装和配置Kerberos
			今天尝试在Hadoop 2.x开发集群上配置Kerberos,遇到一些问题,记录一下 设置hadoop security core-site.xml <property> <name ... 
