Skip to content

Commit 6795443

Browse files
author
Anass Rach
committed
Fix wrong formatting!
1 parent 59f1d63 commit 6795443

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

_data/quiz/questions.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@
955955
category: "Java 21 Features"
956956

957957
- question: "What is the output of this family age comparison system?"
958-
code: |
958+
code: |
959959
class FamilyAges {
960960
public static void main(String[] args) {
961961
Integer dadAge = 127;
@@ -969,12 +969,12 @@
969969
System.out.print(sonAge.equals(daughterAge) + " ");
970970
}
971971
}
972-
options:
972+
options:
973973
- "true false true true "
974974
- "false false true true "
975975
- "true true true true "
976976
- "false true false true "
977977
- "true false false false "
978-
correct: 0
979-
explanation: "Integer caching applies to values -128 to 127. dadAge and momAge both reference the same cached Integer object for 127, so == returns true. sonAge and daughterAge are different objects for 128 (outside cache range), so == returns false. However, equals() compares values, not references, so both equals() calls return true regardless of caching."
980-
category: "Wrapper Classes"
978+
correct: 0
979+
explanation: "Integer caching applies to values -128 to 127. dadAge and momAge both reference the same cached Integer object for 127, so == returns true. sonAge and daughterAge are different objects for 128 (outside cache range), so == returns false. However, equals() compares values, not references, so both equals() calls return true regardless of caching."
980+
category: "Wrapper Classes"

0 commit comments

Comments
 (0)