Java job interview questions

Name all methods of class java.lang.Object
getClass
equals, hashCode
clone
toString
finalize
wait, notify, notifyAll
What are the differences between final, finally, and finalize?
What are the literals?
What are the modifiers?
What are the differences between checked and unchecked exceptions?
What is synchronized?
What is the purpose of volatile?
ArrayList vs LinkedList
How to remove an element from an ArrayList during iteration?
What is the structure of the Java Collections Framework? Why is Map not a Collection?
How does a HashMap work?
How do you sort a Set or Map?
How do you create an immutable collection?
Which collections should be used in a multi-threaded environment?
What are the primitive data types?
What types exist in Java?
What is static?
What are the different access modifiers?
Describe the process of creating an instance of a class
Does new Integer(128) == 128?
Does new String("Hello_42") == "Hello_" + 42?
Are parameters passed by reference or by value in Java?
What types of references exist in Java?
What is inside .class file?
How much memory does an object occupy?
How does garbage collection work?
What can you do with a variable holding null?
What is an enum?
What is the purpose of class loaders?
What are the default class loaders?
Overload vs override
How to write a singleton?
What is the difference between interface and @interface?
Why do we need the default keyword?
When does Class.getClassLoader return null?
What is the order of modifiers
What is short-circuiting in logical operators?
What are the integer bitwise operators?
How can you determine if A is a subtype of B?
What is Type Erasure?
How can you restrict the type of a generic parameter?
What are Covariance and Contravariance?
What is a bridge method?
What is heap pollution?
How does type inference work?
What are string classes available in Java?
How to iterate over a string?
What is a String made of?
How to declare a method with a variable number of arguments?
What is the difference between interface and abstract class?
What if both implemented interfaces declare the same method?
How do atomics work?
What happens if the finally block throws an exception?
What is a daemon thread and how to create one?
Why are thread-local variables used?
How to work with Shutdown Hooks
How to write an immutable class?
What is the difference between JDK and JRE?
How to use regular expressions in java?
Which classes are involved in connecting to a database?
What is the purpose of the assert keyword?
Features of the Matcher class
What is the difference between JAR and WAR files?
How Does Spring Framework Implement the Dependency Injection Pattern?
How to use SPI?
Where is the entry point of a Java application?
What is the default scope of Spring beans?
What is a functional interface?
What is classpath?
What is in the manifest file?
What is the purpose of the super keyword?
When to use WEB-INF and when to use META-INF?
Can a static method be overridden?
How to launch another program from a Java application?
When are aware interfaces used in Spring?
Describe the Lifecycle of a Spring Bean