
Java if and case statements

Flashcard
•
Computers
•
10th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

21 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the right way of defining a String variable? Options: String name = "John"; String name = "John" String name = John; String name "John";
Back
String name = "John";
2.
FLASHCARD QUESTION
Front
Which of the following is the right way of defining char variable? Options: char myGrade = 'B';, char myGrade = "B";, char myGrade 'B';, char myGrade = "B"
Back
char myGrade = 'B';
3.
FLASHCARD QUESTION
Front
What will be the output of the following code?
int x = 10; x = x + 5; System.out.println(x);
Back
15
4.
FLASHCARD QUESTION
Front
Imagine you have $4 and you are checking if you can buy a toy that costs less than $5 and a snack that costs less than $10. System.out.println(x < 5 && x < 10); What will the output be?
Back
true
5.
FLASHCARD QUESTION
Front
What will be the output of the following code?
int x = 4.4; int y = 5.5; System.out.println(x == y);
Back
false
6.
FLASHCARD QUESTION
Front
What will be the output of the following code?
int x,y;
x=15;
y=20;
if(x>15)
{
if(y>15)
{
System.out.println("y is "+y);
}
}
else
{
System.out.println("X is "+x);
}
Back
X is 15
7.
FLASHCARD QUESTION
Front
Which of the following is the correct way to create a String? Options: String s = "I am cool"; string string = i am cool; String s = I am cool; String s = "I" am cool;
Back
String s = "I am cool";
Create a free account and access millions of resources
Similar Resources on Wayground
19 questions
Basics Python

Flashcard
•
8th - 10th Grade
16 questions
centripetal acceleration

Flashcard
•
10th Grade
15 questions
OUR Integrated Math 2 Unit 6 Review (Similarity & Trigonometry)

Flashcard
•
10th Grade
13 questions
Java ArrayLists

Flashcard
•
10th Grade
9 questions
Java String and Character Classes Revision

Flashcard
•
11th Grade
18 questions
Python Basics Review

Flashcard
•
10th Grade
14 questions
AP CSP Algorithms & Programming (College Board Style)

Flashcard
•
9th - 12th Grade
16 questions
Алгоритмы ветвления

Flashcard
•
8th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade