1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Java学習メモ(論理演算子)

Last updated at Posted at 2019-06-30

Java Silverの勉強を始めたので、自分の忘備録としてUPします。
ざっくりとしたメモなので、詳細は記載してません。

論理演算子

&&演算子は、左の式でfalseの場合、右の式を評価しないので、変数bはインクリメントされない。

 int num1 = 10;
 int num2 = 10;
 if(10 < num1 && 10 < ++num2){
num1++;
 }
 System.out.println(num1 + num2);

解:20

1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?