0
0

More than 1 year has passed since last update.

【 Javaの条件式 】

Posted at

現在Javaを独学で学習中です。
この投稿はその備忘録になります。

制御構造

変数や型・リテラル・演算子などを利用した文を実行させる順番のことを制御構造とよびます。
制御構造の代表的なものとして、

①順次
②分岐
③繰り返し

があります。

①順次

「単純に次の文を実行する。」
下図のように上からした下にソースコードを実行します。

public class Main{
 public static void main(String[] args){
  int age = 23;
  System.out.println(age);
 }
}

②繰り返し

「条件によって違う文を実行する。」
下図のように、条件によって実行する内容が異なります。

public class Main{
 public static void main(String[] args){

 }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0