Multiple if statements, even if the previous if is true, the subsequent if will continue to judge,
If you use else if it is only if the former is false, its if is then judged.
If Else statement
If a>=5 Shuchu b=10
else Shuchu c=10
There must be a situation that satisfies the above conditions,
Else if statement the former is only false before running if statement
If a=10 Shuchu b=10
else if a.10 Shuchu b=11
else Shuchu c=10
12.5
If, for after does not add ";"
";" represents an empty statement
12.7
Bubble sort
Int[] A=new int[10]
What is the outer loop (number of times)? How many times? 10-1
What is the inner loop (number)? How many times? 10-Number of trips
for (int i=1;i<=9;i++)
{
for (int j=1;j<=10-i;j++)
if (A[j]>a[j-1])
{
int temp=a[j-i];
A[J]=A[J]
A[j]=t
}
}
12.10
Object oriented first want to build a few class
The parent is constructed first to construct its own
The difference between overriding and overloading
Overloading is the same method name, with different parameters including the number of parameters and the parameter data type
Overrides are method names and parameters are different
Property (without parentheses) length
Method (with parentheses) System.out.println ()
' single quotation marks are characters
"" Double quotes as strings
12.18
Java is a single inheritance
Earlier Java notes