Have a question?
Message sent Close

Java Quiz – Core

“Challenge Yourself. Learn by Doing.”

time left:
:
:

Quiz on Java

Submit quiz
Once you submit, you will no longer be able to change your answers. Are you sure you want to submit the quiz?
Several question to understand what do you want.
1.
In Java, a class can inherit from multiple classes at the same time.
True
False
2.
Which of the following are primitive data types in Java?
int
String
boolean
double
3.
What is the correct way to declare a variable in Java?
var myVar = 10;
int myVar = 10;
variable myVar = 10;
String myVar = 10;
4.
Explain the concept of 'inheritance' in Java.
Keyword #1
Keyword #2
Keyword #3
Keyword #4
5.
Which keyword is used to define a constant in Java?
final
var
static
const
6.
Match the following Java data types with their descriptions:
int
Drag answer here
double
Drag answer here
String
Drag answer here
boolean
Drag answer here
A data type that stores true or false values
A data type that stores sequences of characters
A data type that stores whole numbers without decimals
A data type that stores floating-point numbers with decimals
7.
Which of the following are valid data types in Java?
int
float
char
double float
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7