
Java Programming Quiz

Quiz
•
Computers
•
12th Grade
•
Medium
Fidaa Abed
Used 4+ times
FREE Resource
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to declare instance variables private in Java?
public
protected
private
static
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which naming convention is followed for class names in Java?
Pascal Case
Snake Case
Camel Case
Kebab Case
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default initial value for a String instance variable in Java?
Empty String
0
null
undefined
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following describes a local variable in Java?
It exists only within a method
It is accessible to all classes
It is initialized by default
It is declared outside of methods
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to create an object in Java?
make
new
create
object
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method is used to set the name of an object in the Account class example?
getName
setName
assignName
setAccountName
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if a method has a local variable with the same name as an instance variable?
Compilation error
Method will use the instance variable
Method will use the local variable
An exception will be thrown
Create a free account and access millions of resources
Similar Resources on Wayground
16 questions
Java Chapter 1 CS2

Quiz
•
9th - 12th Grade
15 questions
CSS

Quiz
•
12th Grade
14 questions
Java - Lección 1ero

Quiz
•
12th Grade
22 questions
Web Technologies

Quiz
•
12th Grade
20 questions
WEB DESIGN QUIZ P2

Quiz
•
12th Grade
12 questions
Loops

Quiz
•
9th - 12th Grade
20 questions
Preguntas sobre JavaScript

Quiz
•
9th Grade - University
18 questions
Object Orientated Programming (BTEC Computing)

Quiz
•
11th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade