Consider the following code segment. int num = /* initial va…

Consider the following code segment. int num = /* initial value not shown */;boolean b1 = true;if (num > 0){ if (num >= 100) { b1 = false; }}else{ if (num >= -100) { b1 = false; }} Which of the following statements assigns the same value to b2 as the code segment assigns to b1 for all values of num?

Consider the following code segment. double regularPrice = 1…

Consider the following code segment. double regularPrice = 100; boolean onClearance = true; boolean hasCoupon = false; double finalPrice = regularPrice; if(onClearance) {      finalPrice -= finalPrice * 0.25; } if(hasCoupon) {      finalPrice -= 5.0; } System.out.println(finalPrice); What is printed as a result of executing the code segment?