What Will It Print?
Where Is The Error?
Binary
Random Trivia
CORE Classes Trivia
100

public class Q1 {

    public static void main(String[] args) {

        System.out.println("Hello World!");

    }}

Hello World!

100

1. public class Q1 {

2.     public static void main(String[] args) {

3.         int x = 5

4.         System.out.println(x);

5.     }}

line 3 (missing semicolon)

100

101

5

100

What color are the smurfs?

blue

100

What formula do you use to find the roots of a function, even if they are imaginary?

Quadratic Formula

200

public class Q2 {

    public static void main(String[] args) {

        int a = 5;

        int b = 3;

        System.out.println(a*a + b);

    }}

28

200

1. public class Q2 {

2.     public static void main(String[] args) {

3.         String name = "Alice";

4.         if(name = "Bob") {

5.             System.out.println("Hello Bob");

6.         }}}

line 4 (should use ".equals" instead of "=")

200

1111

15

200

How many countries are there? within 5

195

200

What is wrong with the following sentence?

Running down the stairs, the backpack was in Jim's hands as he left his house.

Misplaced Modifier

300

public class Q3 {

    public static void main(String[] args) {

        String x = "Java";

        String y = "Script";

        System.out.println(x + y.length() + "7");

    }}

Java67

300

1. public class Q3 {

2.     public static void main(String[] args) {

3.         int[] numbers = {1, 2, 3, 4};

4.         System.out.println(numbers[4]);

5.     }}

Line 4 (there isnt a 4th index in the array)

index out of bounds error

300

100101

37

300

What is the only mammal capable of true flight?

Bat

300

When energy is released in the body, what does ATP break down into?

ADP + Phosphate group

400

public class Q4 {

    public static void main(String[] args) {

        int x = 7;

        if (x % 2 == 0) {

            System.out.println("Yes");

        } else {

            System.out.println("No");

        }}}

No

400

1. public class Q4 {

2.     public static void main(String[] args) {

3.         for(int i = 0; i < 5; i++) 

4.             System.out.println("Number: " + i);

5.         }}}}

Line 5 (extra closing "}" bracket)

400

1101101

109

400

What is the smallest country in the world by land?

Vatican City

400

What is the median of this list: [1,1,2,3,3,3,3,3,4,4,4,5,5,5,6,7,7,7,8,8,9,9]

4.5

500

public class Q5 {

    public static void main(String[] args) {

        String word = "coast";

        for (int i = 0; i < word.length(); i += 2) {

            System.out.print(word.charAt(i));

        }}}

cat

500

1. public class Q5 {

2.     public static void main(String[] args) {

3.         int x = 10;

4.         int y = 0;

5.         System.out.println(x / y);

6.     }}

Line 5 (dividing by 0 when u run it)

500

101011101

349

500

What is the atomic symbol of "Cs"?

Caesium

500

A 1670 kg car is speeding at 40 m/s. It crashes headfirst into a 900 kg car going at 60 m/s. If the two cars stick together as they collide, approximately what is the velocity of the two cars immediately after the crash? (Round to the nearest integer)

47 m/s

M
e
n
u