-
Internal implementation of hashmap, linkedhashmap, treemap, concurrent hashmap and differences b/w them.
-
Difference b/w Comparable and Comparator
-
What is Encapsulation and where are you using in your project.
-
Difference b/w Aggregation, Composition and Inheritance.
-
What are the design patterns you have used in your project. Explain with programming example
-
How you can implement Immutable class
-
Difference b/w transient and volatile keyword.
-
Singleton breakthrough from serialization. Where Singleton used? Hint: basically transient keyword.
-
Java 8 streams (convert list into non duplicate list).
-
Java 8 doesn't have SET and maps.
-
Difference b/w hashset and hashmap.
-
Can you create a custom hashmap implementation.
-
kafka - partitioning.
-
What is TDD, microservices, CI/CD ?
-
annotations - qualifier, autowire (where objects stores in spring). Rest API annotations.
-
Difference b/w spring boot and spring.
-
What is @transactionalManagement annotation does ?
-
SOLID principles.
-
Java 8 streams, optional, functional interface
-
how to inject bean b having prototype into bean a which is singleton scope. (using xml and annotation both).
-
Exception handling - catch and finally both have throw exception. which will be thrown?
-
calling class will implement exception? if child class throw exception in overriden method for both checked and unchecked.
-
static have a sysout, constructor have sysout, method have sysout. tell the calling sysouts.
-
GC - all spaces like perm gen and all and how it happens.
-
What does @Qualifier annotation does ?
-
serialization - also if serialization have static variable/method what happends and how do we serialize.
-
What if serialize class have a non- serialized object - will it send over network?
-
What if serialize class have a child class which is non - serialized and vice versa - what happens?
-
What is Executor framework.
-
Arrays.asList(array[]) - what if we will try to add and modify existing data into list. Will the array get impact?
-
asSynchronized and ... collection class methods use.
-
fail fast and fail safe iterator. Example of fail safe iterator.
-
How synchronized keyword used.
-
String a = new String(""); will go into string pool or heap? if we have this value in heap how will I send it into string pool.
-
Some multithreading hide problem using some boolean value.. mirroring ya screening karke kuch
-
Which one is better - linked list or array list and in what cases?
-
CountdownLatch, concurrency in multithreading, caching,
-
Callable vs Runnable - what kind of return in callable?
-
Classloaders and sequence of loading classes.
-
if I have imported some package and not using it in class. will it gets load?
-
jms kafka rest api
-
constructor vs method reference
-
ACID property
-
deep cloning and shallow cloning.
-
What is race confition
-
What is reiterant lock
-
What is atomicity ?
-
hashcode method of hashmap method structure
-
What is double linked list
-
For our own thread pool we will go for queue.
-
G1GC and all methods of GC
-
What is try with resources ?
-
What is deep and shalow copy
-
What is finalize() method.
-
How hashset internally works?
-
Singleton(default*) Scopes a single bean definition to a single object instance per Spring IoC container. prototype. Scopes a single bean definition to any number of object instances. request.... session.... global session
-
Difference b/w primitive data types and Wrapper classes in java.
-
What is Divide and Conquor approach. Where have you used explain with an example.
-
What does the
add
method of ArrayList, HashSet and HashMap returns ? -
In which scenario, ArrayList add method returns false ?
-
Does an abstract class in java have empty or no methods at all ? --->
abstract class A{}
-
Why we can't create an object of abstract class ?
-
What is the difference between default and static methods inside interfaces in java 8
-
What is autoboxing and un-boxing in java ?
-
Why java have wrapper classes if primitive types were already there ?
-
What is the difference between a List and a Set ?
-
What happens when a class is implementing 2 interfaces which is having same default method, how compiler will decide which one to call ? How this ambiguity can be resolved ?
-
Similar as above instead of default method if we have static method will the behavior is same ?
-
What are the characteristics of hashmap and what does hash function's return type ?