This article provides a collection of frequently asked Java HashMap Interview Questions interview questions and answers. Java HashMap Interview Questions Can we synchronize a HashMap ? Can we add duplicate keys in a HashMap ? What happens to the value if we add a duplicate key with new value ? Is is […]
Category: Java Interview Questions
Predicate vs Function in Java 8
Java 8 Predicate and Function Both Predicate and Function are predefined functional interfaces introduced in JDK 8. These are added in java.util.function package. Predicate Interface This is represented as Predicate<T> where T is an object type input. The purpose of Predicate<T> is to decide if the object of type T […]
Top Java 8 Interview Questions and Answers
This post contains interview questions related to new features introduced in java 8 . What is a lambda expression ? What are advantages of lambda expression ? What is a functional interface ? What is the type of a lambda expression ? What is the target type of a lambda expression ? What is the […]
Java Interview questions – Part 4
Can a class be declared both abstract and final ? If not, why ? We can not declare a class both abstract and final. This is because, the keyword abstract represents an incomplete class which depends on the subclasses for its implementation. Creating a subclass is compulsory for a abstract class . final […]
J2EE Interview Questions – Part 2
Click on below link to see part 1 of the J2EE interview questions: J2EE Interview Questions Here are the next set of J2EE interview questions & answers. Difference between HTTPServlet and GenericServlet GenericServlet is protocol independent. HttpServlet extends GenericServlet and provides support HTTP protocol specific methods like goGet() and doPost(). Difference between […]