✦ 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
Variable names cannot start with digits and must be properly initialized or declared.
Q 1
1 / 20
0s
Which of the following is a valid variable declaration in Java?
int num = ;
int num;
int 1num;
int;
The + operator is used to perform addition of numeric values.
Q 2
2 / 20
0s
Which operator is used to perform addition in Java?
Addition (+)
Multiplication (*)
Division (/)
Modulus (%)
Multi-line comments in Java are written using /* … */.
Q 3
3 / 20
0s
Which type of comment is used for multiple lines in Java?
// comment
/* comment
## comment
/* comment */
The extends keyword allows one class to inherit properties from another class.
Q 4
4 / 20
0s
Which keyword is used to achieve inheritance in Java?
extends
implements
super
inherit
Java was developed by Sun Microsystems in 1995, which was later acquired by Oracle Corporation.
Q 5
5 / 20
0s
Which company originally developed Java programming language?
IBM
Microsoft
Sun Microsystems
Apple
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?
start()
main()
execute()
run()
The new keyword is used to allocate memory and create an object of a class.
Q 7
7 / 20
0s
Which keyword is used to create an object in Java?
object
create
new
make
The default value of a boolean variable in Java is false.
Q 8
8 / 20
0s
What is the default value of a boolean variable in Java?
null
true
false
0
Java strictly enforces type rules, making it strongly typed.
Q 9
9 / 20
0s
Java is considered which type of language based on type checking?
Loosely typed
Dynamically typed
Weakly typed
Strongly typed
Java programs are compiled into bytecode, which is executed by the JVM, making them platform-independent.
Q 10
10 / 20
0s
Why is Java considered a platform-independent language?
It does not require compilation.
It runs on the Java Virtual Machine (JVM).
It is only used on Windows.
It uses machine code directly.
Every statement in Java must end with a semicolon (;).
Q 11
11 / 20
0s
Which symbol is used to terminate a statement in Java?
,
:
.
;
Both if and switch statements are used for decision-making.
Q 12
12 / 20
0s
Which of the following statements is used for decision-making in Java?
switch
loop
Both B and C
if
String is a class in Java, whereas int, float, and char are primitive data types.
Q 13
13 / 20
0s
Which of the following is not considered a primitive data type in Java?
float
char
int
String
Java is a high-level, object-oriented programming language designed to be platform-independent and secure.
Q 14
14 / 20
0s
What is Java primarily known as in the world of programming?
A high-level, object-oriented programming language
An operating system
A web browser
A database management system
The continue statement skips the current iteration and moves to the next one.
Q 15
15 / 20
0s
Which keyword is used to skip the current iteration of a loop?
skip
break
continue
pass
The int data type in Java always occupies 4 bytes (32 bits), regardless of the platform.
Q 16
16 / 20
0s
What is the size of the int data type in Java?
4 bytes
8 bytes
2 bytes
Platform-dependent
The final keyword makes a variable constant.
Q 17
17 / 20
0s
Which keyword is used to declare a constant variable in Java?
fixed
final
static
const
The break statement exits the loop immediately.
Q 18
18 / 20
0s
Which keyword is used to terminate a loop immediately?
exit
stop
break
return
The JVM interprets or compiles bytecode into machine-level instructions.
Q 19
19 / 20
0s
Which component is responsible for converting Java bytecode into machine code?
JDK
Compiler
JVM
JRE
The class keyword is used to define a blueprint for objects in Java.
Q 20
20 / 20
0s
Which keyword is used in Java to declare a class?
object
class
define
structure
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


