If you're fresher and have been planning to get a job in java development, then follow the below practices to prepare for Java Interview.
Prepare core Java from scratch from Java Tutorial or any book.
Basic understanding of spring framework, hibernate and JPA (Commonly use technologies nowadays in java development)
Basic understanding of jQuery JavaScript, it might help you to learn its frameworks. Like node.js, angular.js, react.js & etc.
Basic fundamental knowledge of database-like joins, triggers, stored procedure, functions and inbuilt functions.
Last but not the least if you’re really don't know the answer tell to interviewer instead of giving wrong answers.
If you are preparing for an interview, I would recommend this Java Interview Questions blog for most frequently asked questions in Java Interview.