Skip to main content

Posts

Showing posts from December, 2019

Top Core Java Interview Questions

Here is a list of the most asked java interview questions for software engineers. I have kept the answers short so that this compilation can be handy during last-minute brush-up. I would love to hear your feedback regarding this list, do leave your suggestions and comments. 1. Why Dimond problem does not occur with default method implementation in Java 8? A. From Java 8, default methods are introduced and since then we can inherit from multiple interfaces. This creates a conflict if a default method in 2 different interfaces or a combination of classes and interface has the same signature. To resolve this conflict following rules are laid down in Java 8 - A class will have greater priority over interfaces during conflict resolution. This means if a sub-class extending from class and interface finds a conflicting method common to both parents the method inside ...