Most of these questions has been answered in my eBook "Cracking the Core Java Interview" updated on June 2018, that you can buy from this link:
Core Java
Core Java - OOP Concepts, Garbage Collection, Multi-threading, Collections Framework, Java 8 Features, Lambda Functions, Streams.
Core Java - OOPS, Inheritance, Garbage Collection, multi-threading & Concurrency, Java Collections framework.
OOP Skills
Inheritance Concepts
Garbage Collection
-
How does Mark and Sweep Work?
-
What are different Memory generations in java?
-
How will you troubleshoot Memory Issues in a Java application running in production?
Multi-threading and Concurrency in Java
-
Threading Jargons in java
-
What is Non Blocking Algorithm? What is CAS?
-
Explain Internals of Concurrent HashMap
-
What is use of CopyOnWriteArrayList?
-
What is ThreadLocalRandom? when should one use it over Random?
-
What is Executors?
-
What is Thread Pool? How will you implement a basic thread pool from scratch?
-
What is Fork Join?
-
How are Concurrent Collections different from Normal Collections?
-
What is a Blocking Queue?
-
What is difference between ArrayBlockingQueue, DelayQueue and LinkedBlockingQueue in Java?
-
What is Semaphore?
-
What is CountDownLatch?
-
What is CompletionService or ExecutorCompletion Service? Give a practical use case.
-
What is special about classes present in concurrent.atomic package? What is CAS?
-
What is Stamped Lock introduced in Java 8?
-
There are 3 different threads in a single method, how will you make then run sequentially?
Java Collections Framework
-
What is difference between Hashmap and ConcurrentHashMap?
-
What is red-black-tree?
-
What is MinHeap?
-
What is Merge Sort? Which Sorting is used by Java Collections.sort() internally?
Coding Problems for Core Java
-
Write a simple Java program which will print Fibonacci series
-
Write a Program that calculates Prime Numbers in Java.
-
Write a program to check if a given String is Palindrome
-
Write a Program to check if given number is Armstrong number
Design Problems
-
Implement a Basic Token Bucket Algorithm in Java
-
Design and Implement a File Storage for millions of files. Consider that not more than 1000 files should be placed inside a single directory.
-
Implement a Web Crawler algorithm using Java
-
Design a Vending Machine in Java
-
Concept of Consistent hashing in distributed systems (Apache Cassandra)
-
Using Hashing to distribute the load horizontally
Books and References
-
Head First Design Patterns
-
Head First Object Oriented Design and Analysis
-
Concurrency In Practice by Biran Goetz
-
Effective Java 2nd Edition
ebook PDF - Cracking Java Interviews v3.5 by Munish Chandel
240 real Java interview questions on core Java, concurrency, algorithms, design & data structures, spring, hibernate for Investment Bank, Healthcare IT, product and service based companies, Author : Munish Chandel, Price: 250, Type: PDF