Core Java Interview

General
======
Design immutable class? Why instance variables are final?
Polymorphism
How to immutable the Date class?
LocalDate or LocalDateTime (Java 1.8)
Print sequence using 3 threads in java
https://java2blog.com/print-sequence-3-threads-java/
Explain current project architecture?
What is the mean?
What is VaR?
What is Historical simulation?
Find the middle index of the given array or collection?
Find if the list is cyclic or not?
Explain current project architecture?
what is lock which one is better synchronization or lock API
What is complexity?
web service difference between REST and SOAP.
Another way of transferring data than web services
Object to XML conversion
Annotation use in POJO classes in rest services.

Thread
=======
No of way to create a thread.  
Difference between Callable and Runnable.
The print alternate number using two threads and so on. (Even and Odd Thread)
Difference between CyclicBarrier and CountDownLatch?
https://javahungry.blogspot.com/2018/08/difference-between-countdownlatch-and-cyclicbarrier-in-java.html
Scenario- We have to execute the controller method after the execution of 3 thread which one you will use?
Before the main server is going to up  we have to start submodules and when the submodule or application is up then the only main server will be up in this scenario what will you prefer countdown latch or cyclic barrier 


Collection
========
HashMap internal working.
https://examples.javacodegeeks.com/core-java/java-hashmap-vs-treemap-example/
What will happen if you do not override hashcode 
What is a bucket in hashmap?
what is rehashing in hashmap? when it happens
What if we put the same key again in hashmap.
HashMap vs ConcurrencyHashMap
What is HashSet? How internally works?
https://examples.javacodegeeks.com/core-java/sethashset-works-internally-java/
what happens when we do not override equals and hashcode method in the hash map
what if override only hashcode method in case of hashmap
what if we override only equals method in case of hashmap
what is a threshold in map
what if I want to  create a map of a particular capacity
how do you calculate the threshold 
what if I want to copy the millions of records in hashmap
what is lock which one is better synchronization or lock API
What is complexity 
what are ArrayList and Linked list in DS
difference between Array list and linked list in DS not in JAVA
how the memory will be allocated to ArrayList and LinkedList in DS
how to detect a loop in LinkedList
how to find the middle of ArrayList

Situation Based questions
====================
Read the 4 file and count the number of repeated words from all files?
Design Producer and consumer thread, the producer will produce five number and once done consumer should consume five numbers?
Read the file and count the repeated lines in the file?
Scenario- We have to execute a controller method after the execution of 3 thread which one you will use?
How to design the cache in-memory?
How to migrate the database from Oracle to MS SQL
How to migrate the database in BigData/Hadoop?
How to load a million data in HashMap
We have a series of number 123456579. How to identify the pattern.

SQL:
=====
Union vs unionAll
minus
selfjoin

Comments

Popular posts from this blog

Robotic Process Automation

WorkFusion

7 Rules of Success A.P.J Abdul Kalam