31, define an interface class
java file that defines the interface in a maximum of a Public Interface
32, TreeMap ascending order according to the key value
LinkedHashMap sorted insertion order
Map of Operation:
Map<int,int> map=new HashMap<int,int>(); map.put(1,2); map.get(1); map.remove(1); map.clear();
33, inherited the Iterable interface can declare this class is iterative.
34, inner classes
Anonymous inner classes are inherited of an interface.
Static inner classes can not access external non-static members or methods.
Partial inner and anonymous inner classes can only access the process or final body effctively final variable.
Partial internal modifier classes can not have authority or static.
35, non-static member variables static inner classes is not static.
36, non-static inner classes can not create a static method or variable.
37, Thread.sleep blocking the program, without regard to priority
Thread.yield the program goes runnable state, it will only consider a priority greater than or equal thread
thread.join this method blocks the calling thread, the thread end or thread waiting for some time before the thread run
38, inheritance IO input stream
Reference Links: https://blog.csdn.net/pkx1993/article/details/80991812
https://www.cnblogs.com/tomasman/p/6867044.html
39、FileInputStream.read
read () to read a time, to the end of the return -1
Read (byte []) reads the byte [] size number of bytes, if less than, returns true number of bytes to the end of the return -1
read (byte [], int off, int len) read into a len, the byte [off], the first stored memory then back
40, if only one class JAVA file, the file name must be consistent with the class name
If more than one class, only a Public class, file names and Public consistency
No public, can be consistent with any one class.
41, the base class is generated upcast runtime error
42, x.getClass () method is not polymorphic Effect
43, System in package lang
44, URL format: protocol name + hostname + port number (range) + filename