
2. Control Flow Q (Java Introduction) 1
Authored by Anton Prafanto
Professional Development
University
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
26 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
Fill in the blanks to create a valid Scanner object.
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Fill in the blank to test both conditions in the following if statement.
3.
FILL IN THE BLANK QUESTION
3 mins • 1 pt
Fill in the blanks to create a valid program that takes a String input.
4.
FILL IN THE BLANK QUESTION
3 mins • 1 pt
Rearrange to create a valid program that takes an integer input and outputs its double.
int x = sc.nextInt(); //7
System.out.println(x*2); //6
Scanner sc = new Scanner(System.in); //2
5.
FILL IN THE BLANK QUESTION
5 mins • 1 pt
Rearrange the code to output the numbers 1 to 5 using a while loop.
num = num + 1; //1
System.out.println(num); //2
} //3
while(num <= 5){ //4
int num = 1; //5
6.
FILL IN THE BLANK QUESTION
3 mins • 1 pt
Fill in the blanks to create a valid program that takes a String and an integer as input, then outputs a welcome message.
7.
FILL IN THE BLANK QUESTION
3 mins • 1 pt
Fill in the blanks to output "Open" if the time value is less than 20.
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?