Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*.war
*.ear

.idea/

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/target/
Binary file added Java interview questions and answers.pdf
Binary file not shown.
Binary file added __pycache__/java_quiz_console.cpython-312.pyc
Binary file not shown.
Binary file added __pycache__/java_quiz_win.cpython-312.pyc
Binary file not shown.
16 changes: 16 additions & 0 deletions _inspect.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import json

with open("data/java-questions.json", "r", encoding="utf-8") as f:
qs = json.load(f)

ids_to_check = [5, 16, 20, 30, 46, 51, 207]
am = {"a": 0, "b": 1, "c": 2, "d": 3}

for q in qs:
if q["id"] in ids_to_check:
idx = am[q["answer"]]
print(f"=== Q{q['id']} (ans={q['answer']}) ===")
print(f" Q: {q['question']}")
print(f" Opt[{idx}]: {q['options'][idx]}")
print(f" Expl: {q['explanation']}")
print()
Loading