While this approach makes sense in theory, in practice it doesn't work because most tech interviewers don't know what's actually essential to the job. Ie they'll probably end up asking some trivia Java question thinking it's what every "good" software engineer should know.
[Original poster here] I agree in the wrong hands it can be dangerous. If you really think knowing the package visibility of a static variable in Java is the critical thing to succeed in your role, then you have bigger problems.
99% of tech companies have bigger problems then :) I say this as someone who's done interviews for several different professions; tech is by far and wide the most binary and detached from business reality unfortunately.