Talk not much, directly on the dry goods ...
One: Process Control statements
Break: Ends the current loop
Continue: End this cycle and continue the next cycle
Return: End method
Two: Methods
1. Features of the method:
A function defined in a class that has a specific function.
Methods are peer to method and cannot be defined in methods. Methods can only be called by methods.
2. Overloading of methods:
In the same class, the method name is the same, the parameter list is different (the number is different, the corresponding type is different).
Is independent of the return value type.
If the corresponding type is different, it is related to the order.
Independent of the variable name of the formal parameter
3. Rewrite the method:
Subclasses can inherit methods from the parent class without having to rewrite the same method. But sometimes subclasses do not want to inherit the parent class's methods, but want to make some changes, which requires a method of rewriting. Method overrides are also called method overrides.
Three: Arrays
An array is a container that stores multiple elements of the same type. The elements in the array are automatically numbered from 0 for easy access.
Common format int[] arr = new INT[3]; Int[] arr = {A-i};
Java basic Two < flow control statements, methods, arrays, Java memory structure > not yet ...