
Java Concepts Quiz

Quiz
•
Other
•
University
•
Medium
Crackify Crackify
Used 1+ times
FREE Resource
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Where is a local variable stored in Java?
Stack
Heap
PermGen
Code Segment
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which memory area stores objects in Java?
Stack
Heap
Method Area
Registers
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method returns the hash code of an object?
hashValue()
hash()
hashCode()
getHash()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the contract between equals() and hashCode()?
If two objects are equal, they must have the same hash code
If hash codes are same, objects are always equal
They are unrelated
Only equals() matters in Collections
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you override equals() but not hashCode()?
Compilation error
Runtime error
May break hash-based collections
Nothing happens
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What data structure does HashMap use internally?
Array
LinkedList
Array + LinkedList/Tree
TreeMap
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to compare contents of two strings?
==
equals()
compare()
hashCode()
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Empathy Map, Customer Segment, VPC, SLC

Quiz
•
University
20 questions
General Knowledge - Sports

Quiz
•
1st Grade - Professio...
18 questions
Quiz3 review SP23

Quiz
•
University
20 questions
Fiksi dan non fiksi

Quiz
•
12th Grade - University
16 questions
Fortnite

Quiz
•
KG - Professional Dev...
16 questions
Famous youtubers/twitch streamers

Quiz
•
KG - Professional Dev...
15 questions
Data Structure & Algorithm

Quiz
•
University
19 questions
DofE Award

Quiz
•
9th Grade - University
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 Other
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University