Java-Flashcard for Boyz

Java-Flashcard for Boyz

Assessment

Flashcard

Computers

University

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

17 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What will be the output of the following code?

System.out.println(10 / 3);

Back

3

2.

FLASHCARD QUESTION

Front

What is wrong with this variable declaration?

int 123num = 5;

Back

Variable names cannot start with a number

3.

FLASHCARD QUESTION

Front

What is the default value of an int variable in Java?

Back

0

4.

FLASHCARD QUESTION

Front

Find the Output:
public class Test {
static int count = 0;
Test() {
count++;
}
public static void main(String[] args) {
Test obj1 = new Test();
Test obj2 = new Test();
System.out.println(count);
}
}

Back

2

5.

FLASHCARD QUESTION

Front

Predict the Result:
int arr[] = {1, 2, 3, 4, 5};
System.out.println(arr[5]);

Back

ArrayIndexOutOfBoundsException

6.

FLASHCARD QUESTION

Front

What is the output of the following code?

String str = "Hello";
System.out.println(str.length());

Back

5

7.

FLASHCARD QUESTION

Front

What will be the result of the following code?

boolean flag = true;
if (flag) {
System.out.println("True");
} else {
System.out.println("False");
}

Back

True

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?