Posts

Java Interview Questions

Recently I attended an interview with one of the reputed MNC. I felt the interview questions were good and thought it would be helpful for people if I share them.   Core Java How to fetch values of a map and put into sorted set? Difference b/w 'is a' and 'has a' relationships?  Explain final, finally & finalize keywords? Can a method be final? Why do we have a method to be final?  Can a class be final? Diff between synchronize and serialization? Can a static method be synchronized?  Diff between “” and string object? Advanced Java what are different memories we have in HEAP? What are different types of Garbage Collections(GC) we have?  whats the contract between hash-code and equals method?  Can an Object (Object class) be set into key of a map? What should we be aware of before doing it?  When we move code from java 8 to java 9, what difficulties we face?  Have you read new features of Java 9? Jigsaw? When to use thread dump? When to u