Question 1 while loops can be used to implement counter-controlled repetition an
ID: 675165 • Letter: Q
Question
Question 1
while loops can be used to implement counter-controlled repetition and while loops can be used to implement sentinel-controlled repetition. T/F
Question 2
Java does not require that local variables are initialized when declared, but does require that they are initialized prior to use in an expression. T/F
Question 3
Select only those options corresponding to Java's primitive types from the list below
wide
short
float
bit
boolean
byte
String
char
double
int
long
word
points
Question 4 . The following two statements are functionally equivalent (will achieve the same result): T/F
++var;
var++;
Explanation / Answer
1. True, while loop is similar to for loop, counter can be implemented using while loop too.
2. False, local variable has default values, eg int has default value as 0
3.
short
float
boolean
char
int
long
4. False, ++var will first increase the value and then do the operation, vice versa with var++
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.