Java learning classroom (2)

xiaoxiao2021-03-06  53

Author: Queer

IV. Array: Key points (same type, continuous space)

int [] a; // Define array

a = new int [5]; // Initialization array

a [0] = 1; // assign a value to the array

a [1] = 2; //

........................

V. Control flow

IF (expression) // expression

{

}

----------------------------------------------

Switch // int or char

Case x:

Case Y:

DEFAULT

-------------------------------------------------- -----------

While (expression) // boolean

{

}

Do {

} while; expression;

-------------------------------------------------- ----

FOR (;;)

{

}

-------------------------------------------------- ----------------

Differences between Break and Continue:

Break (interrupt loop, jump out of loop); Continue (interrupt this cycle, jump into the next loop)

转载请注明原文地址:https://www.9cbs.com/read-117010.html

New Post(0)