class 10 output

class 10 output

10th Grade

35 Qs

quiz-placeholder

Similar activities

java

java

10th - 12th Grade

40 Qs

2.16.1: Basic Java Review

2.16.1: Basic Java Review

10th Grade

32 Qs

Latihan 1 PBO XI RPL 2

Latihan 1 PBO XI RPL 2

10th Grade - University

40 Qs

CPJ Lesson 0 IE

CPJ Lesson 0 IE

9th - 12th Grade

30 Qs

Java test 02

Java test 02

1st - 12th Grade

30 Qs

SKT5 : Bab 3 : c) Standard Library, Subaturcara, Tatasusunan

SKT5 : Bab 3 : c) Standard Library, Subaturcara, Tatasusunan

10th - 12th Grade

35 Qs

Latihan 1 PBO XII RPL 1

Latihan 1 PBO XII RPL 1

10th Grade - University

40 Qs

AP CS A Midterm Review

AP CS A Midterm Review

9th - 12th Grade

37 Qs

class 10 output

class 10 output

Assessment

Quiz

Computers

10th Grade

Hard

Created by

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;

}

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?