Search This Blog

Tuesday 4 October 2016

Questions

Executor Frame Work in Java 1.6
Strategy Design Pattern in Java
 How many interfaces required to Builder Design pattern in Java
Capabilities of Jan-kins and had-son build tools

1.how to make object unmodifable of final class while creating immutable class
2. fail safe and fail fast and how concurrent hashmap handles if one thread accessing from same bucket and another
thread is removing/adding from same bucket
3. interface1 and interface2 same set of methods; what happens if class is going to implement both the interfces.
4.
Inter i1 = new Ineteger(10);
Inter i2 = new Ineteger(10);

i1 == i2                                            false

i1.equals(i2);                                   true

i1.equals("10");                               false

"10".equals(i1);                               false

Difference between HashSet and TreeSet:

HashSet: complexity to access element is O(1), it uses hashing algorithm to store values,and it will not give any guarantee to maintain sorted order  and it allows null objects.

TreeSet: complexity to access element is O(log n), it is uses tree structure algorithm to store values, it maintains data in sorted order and it will not allow null objects.

HashSet performance is more than TreeSet.


Maven command to execute micro service:

mvn clean install -DSkipTest=true & java -jar MicroService.jar

No comments:

Post a Comment