1. The method of generating a random number (0~9) is as follows: int random = (int) (Math.random () *10)
2.switch () Note the value of the expression in parentheses after the break and if of the nested application must be integer or character type
3.while () The condition in parentheses is to judge true and False, Do-while () parentheses with a Boolean type convenient to understand
4.for loops, Nested loops
5. The break in the loop jumps out of the statement after the execution loop of the loop, which is often used in switch; Continue out the remaining statements in the loop body and executes the next loop, often in the loop structure
6. Array: Declare, allocate space, assign value, process data.
notation, such as int score[],score=new score[5]
int score [] =new int[5],int score[]={},3 Common wording
Score[i]=input.nextint (), note the parentheses!
Score.length array length.
Arrays.sort (score); array in ascending order.
Java Beginner Notes