11. An iflelse statement is used when you need to choose between two alternative
ID: 3866449 • Letter: 1
Question
11. An iflelse statement is used when you need to choose between two alternatives. True False 12. In a boolean expression which uses the && operator, what would make this expression evaluate to true? boolean x = (frstCondition && second ondition); CIf both the first condition and second condition are false o If both the first condition and second cond tion are true If the first condition is true, but the second condition is fase OIf the first condition is false, but the second condition is true 13. A customer is eligible for a discount based on certain ariteria. Under what conditions does "You qualfy for a discount" print? (Hint: There may be more than one correct answer) int purchase; nt rewardPoints; if (purchase >= 2000 11 rewardpoints >= 4000) { System.out,printin You qualify for discount i (Choose all correct answers) When purchase is 2000 regarless ofthe value of rewardpoints When rewardPoints is more than 1000 and purchase is 1000 When rewardPoints is more than 2000 or purchase greater than 1000 When purchase is 4000 and rewardPoints is 2000 14. What is the resut? public static void main Stringl angs) int point = 10; String s (port 1 ? "point" : "points"); System.out.prindh("l scored" +port +.. +s ): I scored 10 points O Complation eror OI scored 1 point OI scored 1 point 10 points 15. In the OR (II) test, if the first expression on the left hand side is true then there is no need to evaluate the second statement.Explanation / Answer
11)Ans)True
12)Ans)if both first condition and second condition are true
13)Ans)
a)When purchase is 2000 regardless of the value of reward points
d)When purchase is 4000 and reward points is 2000
14)Ans)a) I scored 10 points
15)Ans)True
6)Ans)
b) if statement
c) do while loop
d) if/else statements
7)Ans)c) equals() method
8)Ans)true
9)Ans)==
10)Ans)c)true/false
1)Ans)b)Consonants
2)Ans)
a)String
d)int
3)Ans)True
4)Ans)Below Average Performer
5)Ans)Bob is 43
____________________Thank You
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.