FinalData

1.two kinds of final data:compile_time data(primitives with keyword final) and run_time data

2.final+static fields has only one storage that can't be changed

3.final reference----refer is constant not the value of the refer (arrays included)

(in c++,the value of the const refer can't be changed)

         final primitives----constant 

4.final != you know the value when running  ==>  static and non-static

5.use "public static final" most  (capitals+underscores)

BlankFinal

  1. guaranteed initialized before using

  2. flexibility

  3. initialized in constructor or definition field

FinalArguments

  1. can't change the value of the arguments

  2. especially, when argument is a refer, can't change what it refers to, but can change the value of the pointed object

FinalMethod

  1. two reasons for final method:first,prevent overriding,  for design reason, may what to retain the method from changed (by inheritance);secondly, for time_saving ,final method is inline method,which saves time.

  2. now ,optimizing a method using final is not encouraged

Final&Private

  1. private method is declared final implicityly

  2. "overriding" happens when base-class method is private,you create a public/protected method that has the same name

FinalClass

  1. final class can't be inherited

Caution