| Points |
Defined |
Descriptive narrative |
| Basic data types |
1, Byte (8)
2, shot (16)
3, int (32)
4, Long (64)
5, Float (32)
6, double (62)
7, char (16)
8, Boolean (1) |
|
| Holding objects |
Collection (interface)
->list (sub-interface sequencing can be repeated) &NBSP
->linkedlist (linked list is not synchronized thread insecure)
->arraylist (array out-of-sync thread insecure)  &NBSP
->vector (array synchronization thread safety) &NB Sp &NBSP
->stack
->set (sub-interfaces receive only one internal sort)
->hashset
Linkedhashset
->treeset
Map (interface key value)
->hashtable (synchronous security)
->linkedhashmap (non-sync insecure) & nbsp
->weakhashmap
->treemap
->identifyhashmap |
Collection is a collection of objects. Collection has two sub-interfaces List and Set
List can be obtained by subscript (.) To get the value, the value can be repeated
Set can only use cursors to fetch values. And the value cannot be repeated.
ArrayList, Vector, LinkedList is the implementation class for List
ArrayList is thread insecure, Vector is thread-safe, and these two classes are implemented by arrays
LinkedList is not thread-safe. The underlying is implemented by a linked list
Map is a set of key-value pairs
HashTable and HASHMAP are the implementation classes of MAP
HashTable is thread-safe and cannot store null values
HASHMAP is not thread-safe and can store null values |
| Generic type |
The type of the parameter, which means that the data type being manipulated is specified as a parameter. Such parameter types can be used in the creation of classes, interfaces, and methods, respectively, as generic classes, generic interfaces, and generic methods. The advantage of introducing generics into the Java language is that it is safe and easy. |
The corresponding C + + is the module |
| I/O system |
Java I/O is the input and output operation of Java |
Abstract classes InputStream and OutputStream are the base classes of all byte streams, which provide the basic interfaces for input and output processing, respectively, and implement some of these methods. Because InputStream and OutputStream are abstract classes, Therefore, you cannot create their objects directly. The methods provided in the InputStream class are: reading data from the stream, closing the stream and releasing the system resources associated with the stream and using the tokens in the input stream. The main methods provided in the OutputStream class are: output data, update output stream and close stream, etc.
The classes involved:
The byte input stream contains FileInputStream, Bufferedinputstream, and Dateinputstream.
The corresponding byte output stream contains FileOutputStream, Bufferedoutputstream, and Dateoutputstream. |
| Garbage collector |
One of the three important modules of the Java Virtual Machine (JVM) (the other two are the interpreter and multithreading mechanism). |
Through the garbage collector (garbage Collection. GC) proactively manages the recovery of memory. Program apes do not need to invoke functions to free memory.
|
| Order of initialization |
1. Static members
2. Static function
3. Static Zone
4. Other |
|
| Reference |
The primary variable type has only one storage space (allocated in the stack), whereas the reference type has two storage spaces (one in the stack, the other in the heap), and the value Pass (reference) of the method parameter refers to the memory (heap) in which the parameters are referenced and the arguments are passed in to the same value; |
is Java a value or a pass-through reference?
The base type is a pass-through value |
| Concurrent |
Multi-process programming |
Java provides the underlying coordination mechanism to control access to shared resources. The coordination here consists of competition, cooperation and communication.
Competition: Synchronized, lock
Cooperation: Notifyall, interrupt, Signalall Communication: Pipedreader/pipedwriter |
|
|
|