Please enable JavaScript.
Coggle requires JavaScript to display documents.
class 5 & 6 (for loop (use it when (you can use an integer counter,…
class 5 & 6
-
sentinel value = "guard"
-
ex: want user to give n number of pos nums before program quits -- you can assign it an int that it can never be - ex: neg num -- while (salary >= 0) {…} or while !(salary < 0)
-
-
-
-
strings
to compare strings, must use str1.equals(str2); - is a Boolean statement
-
if, else if, else statements
if you have a statement for your ifs, if elses, that says >4.5 and >9 then >9 MUST be first bc 10 is >4.5 and it will stop running
-
-
-
-