Two conditions in one if statement does the second matter if the first is false?

前端 未结 6 1181
日久生厌
日久生厌 2020-12-04 23:52

Okay, so I have this piece of code tested and I found there isn\'t any exception thrown out.

public static void main(String[] args) {
    int[] list = {1,2}         


        
6条回答
  •  不思量自难忘°
    2020-12-05 00:30

    If first condition is false then it wont check for second condition as anything && F =F again it depends which bit wise operation you are doing . like in case of OR (||) if first condition is true (T) the it wont check for second condition as anything || T = T but if its false (F) then it will definitely check for second

提交回复
热议问题