
Variables and Loops Review
Computers
9th - 12th Grade
Used 8+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
The ++ operator is used in a for statement to automatically increment a counter by 2 during each loop iteration.
True
False
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which String class method returns true if the string length is 0?
length()
isEmpty()
trim()
substring()
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which String class method returns a copy of the string with all leading and trailing spaces removed?
length()
substring()
trim()
toLowerCase()
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which is used to signify that a loop should stop iterating?
accumulator
counter
Boolean value
sentinel
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which keyword does a constant declaration begins with?
import
constant
int
final
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which Scanner class method is used to return a string that does not contain spaces from the input stream?
nextBoolean()
nextInt()
nextLine()
next()
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which data type is most appropriate for whether an employee qualifies for a bonus?
int
double
boolean
char
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?