public class BoolTest1 { public static void main(String[] args) { int age = 15; int year = 14; System.out.println(age == year); year = 15; System.out.println(age == year); System.out.println(age != year); } }}

Grade IX A B C

Flashcard
•
Computers
•
9th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

7 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
false
true
false
2.
FLASHCARD QUESTION
Front
public class BoolTest2 { public static void main(String[] args) { int age = 15; int year = 14; System.out.println( age < year ); System.out.println( age > year ); System.out.println( age <= year+1 ); System.out.println( age-1 >= year ); } }}
Back
false, true, true, true
3.
FLASHCARD QUESTION
Front
public class BoolMod { public static void main(String[] args) { int age1 = 15; int age2 = 16; int divisor = 2; System.out.println("Remainder of " + age1 + "/" + divisor + " is " + (age1 % divisor) ); System.out.println("Remainder of " + age2 + "/" + divisor + " is " + (age2 % divisor) ); System.out.println("Is " + age1 + " even? " + (age1 % 2 == 0) ); System.out.println("Is " + age2 + " even? " + (age2 % 2 == 0) ); } }
Back
Remainder of 15/2 is 1Remainder of 16/2 is 0Is 15 even? falseIs 16 even? true
4.
FLASHCARD QUESTION
Front
How many times will "Hello" be printed in the loop: for(int i=0; i < 7; i+=3) { System.out.println("Hello!");}?
Back
3
5.
FLASHCARD QUESTION
Front
How many times will "Hello" be printed? for(int i=1; i <= 1; i+=3) { System.out.println("Hello!");}
Back
1
6.
FLASHCARD QUESTION
Front
How many times will "Hello" be printed? int i=3; do { System.out.println("Hello!"); } while (++i <= 3);
Back
1
7.
FLASHCARD QUESTION
Front
How many times will "Hello" be printed? for (int i=2; i < 2; i+=1) { for(int j=0; j < 7; j+=2) { System.out.println("Hello"); } }
Back
0
Similar Resources on Quizizz
5 questions
Java - Writing Methods

Flashcard
•
9th - 12th Grade
10 questions
Output in Java

Flashcard
•
11th Grade
10 questions
Java Exception Handling

Flashcard
•
11th - 12th Grade
12 questions
Java Loops

Flashcard
•
9th - 12th Grade
8 questions
AP CS A Flashcard 4 Practice

Flashcard
•
9th - 12th Grade
10 questions
S3 page1 Flashcards

Flashcard
•
9th Grade
9 questions
Java For Loops

Flashcard
•
9th - 12th Grade
5 questions
Java - Writing Methods

Flashcard
•
9th - 12th Grade
Popular Resources on Quizizz
20 questions
math review

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
10 questions
Human Body Systems and Functions

Interactive video
•
6th - 8th Grade
19 questions
Math Review

Quiz
•
3rd Grade
45 questions
7th Grade Math EOG Review

Quiz
•
7th Grade
Discover more resources for Computers
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
20 questions
Investing

Quiz
•
9th - 12th Grade
20 questions
EOC Math 1 Review

Quiz
•
9th Grade
20 questions
Insurance

Quiz
•
9th - 12th Grade
20 questions
MCAS Biology Review

Quiz
•
9th - 10th Grade
20 questions
Paying for College

Quiz
•
9th - 12th Grade
20 questions
Math 1 EOC Review

Quiz
•
9th Grade