
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
Hash Tables Quiz

Quiz
•
University
20 questions
Season 5 #Spaic Python Weekly Quiz

Quiz
•
KG - Professional Dev...
15 questions
Coding Golf Event 2

Quiz
•
University
20 questions
Konsep Struktur Data

Quiz
•
University
15 questions
AlgoWhiz Quiz

Quiz
•
University
20 questions
Week 1 QUIZ

Quiz
•
University
20 questions
Techwiz - ICL2.0 Quiz

Quiz
•
University
20 questions
Mastering Java Concepts

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade