
Java Programming midterm exam
Authored by Bryan Cajurao
Other
University
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
What defines a class in a Java program?
public static void main(String[] args)
public class HelloWorld
System.out.println()
import java.util.Scanner
2.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
What symbol is used to terminate a Java statement?
Colon (:)
Semicolon (;)
Comma (,)
Period (.)
3.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
What is the starting point of any Java program?
The first line of the file
The main method
The class declaration
The import statement
4.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
Which of the following is used to denote the beginning and end of a block in Java?
Parentheses ()
Square brackets []
Curly braces {}
Angle brackets <>
5.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
What is the purpose of the public keyword in a class declaration?
It makes the class accessible to other classes from other packages.
It restricts the class to the same package.
It prevents the class from being instantiated.
It makes the class immutable.
6.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
Which of the following is NOT a type of Java comment?
Single-line (//)
Multi-line (/* */)
Javadoc (/** */)
Inline (#)
7.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
What is the correct way to write a single-line comment in Java?
/* This is a comment */
// This is a comment
# This is a comment
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 Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Quiz ODC-Jan 2021
Quiz
•
University
20 questions
Control systems I(Viscosity controller & OMD)
Quiz
•
University
20 questions
Quiz No. 1_EA
Quiz
•
University
20 questions
Test three (20 questions)
Quiz
•
University
20 questions
NDT Webinar Quiz Bee
Quiz
•
University
20 questions
2p-WTO & OPEC_Int.Org._2024
Quiz
•
University
20 questions
General Awareness
Quiz
•
University
20 questions
Table Napkin Folding
Quiz
•
4th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University