Java learning memo (logical operator)

Since I started studying Java Silver, I will upload it as my memorandum. Since it is a rough memo, details are not described.

Logical operator

If the && operator is false in the expression on the left, it does not evaluate the expression on the right, so the variable b is not incremented.

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

Solution: 20

Recommended Posts

Java learning memo (logical operator)
Java learning memo (basic)
Java learning memo (interface)
Java learning memo (inheritance)
Java learning memo (data type)
Java learning memo (abstract class)
Java learning (0)
Java memo
Java learning memo (creating an array)
Java basic learning content 3 (operator / ternary operator)
Java learning memo (while statement, do-while statement)
java anything memo
Java Silver memo
For JAVA learning (2018-03-16-01)
Java learning day 5
java, maven memo
Java SE 7 memo
java anything memo 2
Java specification memo
java learning day 2
Java pattern memo
java learning day 1
Ruby logical operator drill
Java development environment memo
Java learning 2 (learning calculation method)
java learning (conditional expression)
java basic knowledge memo
Java Kuche Day memo
Java Learning (1)-Hello World
[Java ~ Method ~] Study memo (5)
java se 8 programmer Ⅰ memo
Java paid private memo
Learning memo 01 (forward / redirect)
Java null coalescing operator
JAVA learning history interface
[Java ~ Array ~] Study memo 4
java lambda expression memo
(Memo) Java for statement
Java lambda expression [memo]
[Java] Implicit inheritance memo
java competitive programming memo
[Memo] Java Linked List
Learning memo when learning Java for the first time (personal learning memo)
[Beginner] Java variable / logical operator / extended for statement [Note 22]
Study Java # 2 (\ mark and operator)
Learning Java framework # 1 (Mac version)
Java (WebSphere Application Server) memo [1]
[Java] Variable name naming memo
Java memo (standard class) substring
JAVA learning history interface inheritance
Java memo (standard class) length
(Learning memo) Java 2nd grade measures: Question 1 Main points (knowledge)
Books used for learning Java
4th day of java learning
Java Silver Study Method Memo
[Java ~ Boolean value ~] Study memo (2)
Create a java method [Memo] [java11]
Java Silver exam preparation memo
[Java Bronze] Learning memo (interface, static method, type conversion, etc.)
[Java] Summary of operators (operator)
[Java] Date Related Term Memo