Outline:
1) array
It consists of several items of the same type. Arrays are also objects. Int [] C = new int [2]; C. length or Int C [];
Initialization: the basic data type is initialized to 0 or false. The reference data type is initialized to null. You can use a cyclic structure to initialize it. You can also use the initialization statement to create an array int [] n = {1, 3}. in Java, an array is an object and contains its own methods and fields. For example, N. Length indicates the length of the array.
2) string
String value and value assignment. 11 common methods.
3) Exception Handling
Format: The try block contains several statements that may produce exceptions, followed by several catch blocks for exception processing, and the Catch Block and finally block have at least one.
Exceptions may occur: array subscript out of bounds; Illegal File System Call; network connection error; incorrect operand range; illegal class definition; custom exception requirementsProgramProcessing.
Checked exceptions and non-checked exceptions: The checked exceptions are listed by throws during method declaration and can be detected at compilation. Non-checked exceptions are not in the throws table, errors and runtimeexceptions. The exception can be compiled only after the exception is checked. Non-checked exceptions can only be found at runtime.
Catch (superclass ref) captures sub-classes at the same time; exceptions. There is an inheritance relationship between classes.
Finally block: whether or not exceptions occur, the block is always executed and is generally used to release the obtained resources. If system. Exit () exists in try, finally is not executed; if return exists in try, finally is still executed. No catch or finally at the same time. Common methods in the exception: tostring () printstacktree () getmessage ()