✦ Scientech Easy
Java Fundamentals Quiz Test
📄
20
Questions
⏱
10 min
Time Limit
⭐
4
Marks / Q
−
1
Negative
✅
70%
Pass Mark
‣ Read each question carefully before answering.
‣ Use the palette to navigate and bookmark questions.
‣ Wrong answers carry negative marks. Skipped = zero.
‣ The quiz auto-submits when the timer reaches zero.
‣ Stay in fullscreen mode throughout the quiz. Exiting fullscreen is detected and will result in auto-submission.
✦ Scientech Easy
Java Fundamentals Quiz Test
20 Qs
Multi-line comments in Java are written using /* … */.
Q 1
1 / 20
0s
Which type of comment is used for multiple lines in Java?
// comment
/* comment */
/* comment
## comment
Variable names cannot start with digits and must be properly initialized or declared.
Q 2
2 / 20
0s
Which of the following is a valid variable declaration in Java?
int 1num;
int;
int num;
int num = ;
The break statement exits the loop immediately.
Q 3
3 / 20
0s
Which keyword is used to terminate a loop immediately?
break
stop
exit
return
Java strictly enforces type rules, making it strongly typed.
Q 4
4 / 20
0s
Java is considered which type of language based on type checking?
Dynamically typed
Strongly typed
Loosely typed
Weakly typed
The final keyword makes a variable constant.
Q 5
5 / 20
0s
Which keyword is used to declare a constant variable in Java?
final
fixed
static
const
The main() method is the starting point where the Java Virtual Machine (JVM) begins program execution.
Q 6
6 / 20
0s
Which method serves as the entry point for execution in a Java program?
execute()
main()
start()
run()
Both if and switch statements are used for decision-making.
Q 7
7 / 20
0s
Which of the following statements is used for decision-making in Java?
if
switch
loop
Both B and C
The JVM interprets or compiles bytecode into machine-level instructions.
Q 8
8 / 20
0s
Which component is responsible for converting Java bytecode into machine code?
Compiler
JVM
JRE
JDK
String is a class in Java, whereas int, float, and char are primitive data types.
Q 9
9 / 20
0s
Which of the following is not considered a primitive data type in Java?
int
char
String
float
The new keyword is used to allocate memory and create an object of a class.
Q 10
10 / 20
0s
Which keyword is used to create an object in Java?
make
create
object
new
The class keyword is used to define a blueprint for objects in Java.
Q 11
11 / 20
0s
Which keyword is used in Java to declare a class?
object
class
structure
define
The continue statement skips the current iteration and moves to the next one.
Q 12
12 / 20
0s
Which keyword is used to skip the current iteration of a loop?
pass
break
skip
continue
Every statement in Java must end with a semicolon (;).
Q 13
13 / 20
0s
Which symbol is used to terminate a statement in Java?
.
;
,
:
The default value of a boolean variable in Java is false.
Q 14
14 / 20
0s
What is the default value of a boolean variable in Java?
null
false
true
0
The int data type in Java always occupies 4 bytes (32 bits), regardless of the platform.
Q 15
15 / 20
0s
What is the size of the int data type in Java?
4 bytes
2 bytes
Platform-dependent
8 bytes
Java was developed by Sun Microsystems in 1995, which was later acquired by Oracle Corporation.
Q 16
16 / 20
0s
Which company originally developed Java programming language?
Sun Microsystems
IBM
Microsoft
Apple
Java programs are compiled into bytecode, which is executed by the JVM, making them platform-independent.
Q 17
17 / 20
0s
Why is Java considered a platform-independent language?
It is only used on Windows.
It does not require compilation.
It runs on the Java Virtual Machine (JVM).
It uses machine code directly.
The extends keyword allows one class to inherit properties from another class.
Q 18
18 / 20
0s
Which keyword is used to achieve inheritance in Java?
inherit
implements
extends
super
The + operator is used to perform addition of numeric values.
Q 19
19 / 20
0s
Which operator is used to perform addition in Java?
Division (/)
Addition (+)
Modulus (%)
Multiplication (*)
Java is a high-level, object-oriented programming language designed to be platform-independent and secure.
Q 20
20 / 20
0s
What is Java primarily known as in the world of programming?
An operating system
A database management system
A high-level, object-oriented programming language
A web browser
Time Left
00 : 10 : 00
Question Palette
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Answered
Bookmarked
Not Visited
Finish Test?
You cannot change responses after submission.
⏱ Time's Up!
Your time is up. The quiz will be submitted.
⚠ Fullscreen Mode Exited
Quiz Complete!
Java Fundamentals Quiz Test
Your Score
Correct
Wrong
Skipped
Total Q
Time Taken


