public
class Test {
public
static void main(String[] args)
{
int x = 10, y = 20;
if (x < y)
int a = 10;
else {
System.out.println("BYE");
}
}
}
class 10 output
Quiz
•
Computers
•
10th Grade
•
Hard
Vivek Chamaria
Used 4+ times
FREE Resource
35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
public
class Test {
public
static void main(String[] args)
{
int x = 10, y = 20;
if (x < y)
int a = 10;
else {
System.out.println("BYE");
}
}
}
10
BYE
NO output
Compile time error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public
class Test {
public
static void main(String[] args)
{
int x = 10, y = 20;
if (x < y) {
if (x > y) {
System.out.println("HELLO GEEKS");
} else {
System.out.println("WELCOME");
}
}
}
}
HELLO GEEKS
Compile time error
WELCOME
No Output
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Test {
public
static void main(String[] args)
{
String day = "Sunday";
switch (day) {
case "Monday":
System.out.println("Let's Work");
break;
case "Saturday":
System.out.println("waiting for Sunday");
break;
case "Sunday":
System.out.println("Today is fun day");
}
}
}
Compile time error
Lets work
Run- time error
Today is fun day
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
class MainClass {
public
static void main(String[] args)
{
int x = 10;
Switch(x)
{
System.out.println("GEEKS");
}
}
}
GEEKS
Compile time error
No Output
Run-time error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class MainClass {
public
static void main(String[] args)
{
int x = 10;
int y = 20;
switch (x) {
case 10:
System.out.println("HELLO");
break;
case y:
System.out.println("GEEKS");
break;
}
}
}
HELLO
No Output
GEEKS
Compile time error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public
class Test {
public
static void main(String[] args)
{
for (int i = 0; i < 10; i++)
int x = 10;
}
}
No Output
10
Compile time error
10 (10 times)
7.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
What will be the output of the below code when n=145
int number(int n)
{
int s=0;
while(n>0)
{
s=s+n%10;
n/=10;
}
return n;
}
35 questions
PGAS L3 - JAVA Operators & Escape Sequences
Quiz
•
10th Grade
30 questions
C quiz by Rachai
Quiz
•
5th Grade - University
30 questions
Java Servlets & JSPs Test
Quiz
•
10th Grade
32 questions
Unit 1 APCSA
Quiz
•
9th Grade - University
37 questions
AP CSA Review Set #1
Quiz
•
9th - 12th Grade
32 questions
Arduino
Quiz
•
7th - 12th Grade
40 questions
ULANGKAJI SKT4 -B1
Quiz
•
10th Grade
30 questions
ASESMEN TENGAH SEMESTER INFORMATIKA KELAS X - SMKN 52 JAKARTA
Quiz
•
10th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University