
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
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
14 questions
Non-Defining Relative Clauses
Flashcard
•
10th Grade
18 questions
phythagoras 8
Flashcard
•
9th Grade
22 questions
AQA GCSE Science command words
Flashcard
•
10th Grade
9 questions
Print Culture and Modern World
Flashcard
•
10th Grade
10 questions
Right on 3- Starter
Flashcard
•
9th Grade
10 questions
ATP-ADP Cycle
Flashcard
•
11th Grade
16 questions
Basic Financial Concepts
Flashcard
•
10th Grade
15 questions
Konsep Usaha dan Energi
Flashcard
•
10th Grade
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade