Tip

Tap
a student's name
below to see what they need help with
Quizalize logo
placeholder image to represent content

Java

Quiz by Swathikaa Rk

Feel free to use or edit the questions

includes Teacher and Student dashboards

Measure skills
from any curriculum

Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.

Q 1/33
Score 0
Which of the following is NOT a primitive data type in Java?
30
double
int
boolean
String

33 questions

Q.Which of the following is NOT a primitive data type in Java?
1
30 sec
Q.What is the output of the following Java code?```int x = 5;int y = 10;int z = x + y;System.out.println(z);```
2
30 sec
Q.What is the purpose of the `public` access modifier in Java?
3
30 sec
Q.Which of the following is an example of an object-oriented programming (OOP) principle in Java?
4
30 sec
Q.What is the purpose of the `break` statement in a Java switch statement?
5
30 sec
Q.What is the syntax to declare and initialize an array of integers in Java?
6
30 sec
Q.Which of the following is NOT a valid identifier name in Java?
7
30 sec
Q.Which operator is used to compare two values for equality in Java?
8
30 sec
Q.Which operator is used to perform the modulo operation in Java?
9
30 sec
Q.Which of the following loops in Java is used when the number of iterations is known?
10
30 sec
Q.What is the purpose of the do-while loop in Java?
11
30 sec
Q.What is the syntax for a basic for loop in Java?
12
30 sec
Q.What does the continue statement do in a loop?
13
30 sec
Q.What is the difference between the prefix increment operator (++i) and the postfix increment operator (i++) in a loop?
14
30 sec
Q.What is the default value of the boolean data type in Java?
15
30 sec
Q.Which of the following is not a valid Java data type for storing decimal numbers?
16
30 sec
Q.What is the size of the 'double' data type in Java?
17
30 sec
Q.How do you access the value at a specific index in a Java array?
18
30 sec
Q.How do you initialize and assign values to an array in Java?
19
30 sec
Q.What is the correct syntax to access the last element in a Java array?
20
30 sec
Q.How do you resize a Java array?
21
30 sec
Q.How do you find the minimum value in a Java array?
22
30 sec
Q.What is the correct syntax to declare a constructor in Java?
23
30 sec
Q.What is the output of the following code snippet?public class MyClass { public static void main(String[] args) { int x = 5; int result = x * 2 + 10; System.out.println(result); }}
24
30 sec
Q.Which keyword is used to inherit a class in Java?
25
30 sec
Q.What is the purpose of the 'final' keyword in Java?
26
30 sec
Q.What is the purpose of the 'this' keyword in Java?
27
30 sec
Q.What is the file extension for Java source code files?
28
30 sec
Q.Which keyword is used to declare a method that does not return any value?
29
30 sec
Q.What is the correct syntax to declare a variable in Java?
30
30 sec
Q.Which keyword is used to create an instance of a class in Java?
31
30 sec
Q.What is the output of the following Java code?int x = 5;int y = 2;int result = x / y;System.out.println(result);
32
30 sec
Q.What is the main purpose of a constructor in Java?
33
30 sec

Give this quiz to my class