Java Basics Quiz

Java Basics Quiz

Test your knowledge of Java, one of the most popular and versatile programming languages used for various types of application development.

published 21 days ago
1/11

Which keyword is used to define a constant in Java?

Which keyword is used to define a constant in Java?
final
const
static
constant
2/11

Which package contains the Random class in Java?

Which package contains the Random class in Java?
java.util
java.io
java.math
java.lang
3/11

Which extension do Java programs use for source files?

Which extension do Java programs use for source files?
.js
.java
.jv
.jav
4/11

Which method must be implemented by all threads in Java?

Which method must be implemented by all threads in Java?
start()
sleep()
run()
stop()
5/11

Who initially developed Java?

Who initially developed Java?
Oracle
IBM
Microsoft
Sun Microsystems
6/11

Which environment does the Java compiler produce code for?

Which environment does the Java compiler produce code for?
Hardware
Java Virtual Machine
Network
Operating System
7/11

What is the superclass of all classes in Java by default?

What is the superclass of all classes in Java by default?
Parent
Object
Class
System
8/11

Which is a valid constructor declaration in Java?

Which is a valid constructor declaration in Java?
MyClass Public()
public MyClass()
void MyClass()
public void MyClass()
9/11

What is Inheritance in Java?

What is Inheritance in Java?
Data hiding method
Encapsulation of data
Code reuse mechanism
Abstract methodology
10/11

Which of these is NOT a Java feature?

Which of these is NOT a Java feature?
Pointers
Robustness
Platform Independence
Multithreading
11/11

What is the default value of a boolean variable in Java?

What is the default value of a boolean variable in Java?
0
false
true
null