
Java Programming Quiz
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Medium
Fidaa Abed
Used 4+ times
FREE Resource
Enhance your content in a minute
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
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
13 questions
ICT Lab
Quiz
•
12th Grade
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
12 questions
1.2.4. Types of Programming Language
Quiz
•
12th Grade
20 questions
SOFTWARE 7I
Quiz
•
7th Grade - University
17 questions
Aplicaciones Web
Quiz
•
12th Grade
16 questions
Understanding AI Chatbots
Quiz
•
9th - 12th Grade
20 questions
WEB DESIGN QUIZ P2
Quiz
•
12th Grade
20 questions
Sjmit-Q2-[Workshop-MAR-25]
Quiz
•
12th 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
