
Java Quiz-1
Authored by Praveen Kumar
Professional Development
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default value of a student's attendance in a new semester?
0
0.0
null
undefined
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to define a constant in a programming language?
final
static
const
constant
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of the following scenario?
Shreya has 5 apples.
If Shreya gives away more than 10 apples, what will happen?
Will Shreya have any apples left?
Shreya will have more than 10 apples left
Shreya will have less than 10 apples left
Shreya will have exactly 10 apples left
An error will occur
4.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following is/are not a valid keyword in Java?
class
main
String
public
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the purpose of the "break" statement in a coding competition?
To exit a coding challenge or switch statement
To skip the current iteration of a coding problem
To define a new case in a switch statement
To continue to the next iteration of a coding challenge
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which datatype is used to store a single character in a student's personal information form?
char
String
int
Character
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the result when a student, John, is given a test and asked to solve the following problem?
int num = 10; System.out.println((num++ + ++num));
22
23
Syntax Error
(10+++++10)
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?