
Interview - A
1. Ask details
about last assignment, what are the component, roles and
responsibility; 2.use of multithreading and singleton design pattern
in last assignment.
3. Singleton
Design pattern, double check 4.what are the collection used, which
one is favourite data structure 5.you have less memory resource, you
have an array , once your array gets full how will you insert new
element in array without removing existing element.
6.you have an
employee class which contains a arraylist of address , how will you
make this class immutable, how will you ensure that client could not
remove address from arraylist.
7.what are spring
scopes.
8.Two bean id are
declared for a single class in spring xml, how many instance will be
created.
9. Any question
for me.
Interview - B
1. Spring -
which one is better – setter or constructor injection
2. In a
sorted data how will you find a number with maximum occurrence.
3. About
previous project and multithreading and batch processing experience.
4. There is
a function that accepts two parameters and returns their sum. How
will you synchronize access to it.
5. There
are hundred threads, a module is there which can at most allow 5
threads. how to implement the same.
6.
Experience in design patterns? What is template design pattern and
its usage.
Interview - C
1. From
sorted and duplicate elements find frequency of a given element.
2. Find
loop in linked list
3. HashMap
questions
4. Find nth
element from bottom of a linked list
5. How to
make class Immutable
Interview - D
1.Brief about
yourself and project.
2.Basic pillars
of OOPS.
3.Difference
between abstract and Interface.
4.How to show end
User a message without changing the method signature of already
existing class only change the method body (no overriding). For e.g
: your withdrawal limit has Exceeded more than 40,000.
5.hashmap and its
internal working and some scenario based questions.for e.g
hashmap<Object,Object> hm = new Hashmap<>();
hm.put(CAR,TRUCK);// what is the Output : hm.get(new
CAR(1,”hatchback”));[CAR and TRUCK are different classes with key
value already put in the hashmap]
6.Create your
Custom HashMap and what are the functionalities you will put and
specifically about Entry class.
7.how to
implement custom Singly linkedList.
8.how a hashmap
converts map into a keySet or entrySet for e.g set<Entry.map<K,V>>
= hm.entrySet<K,v>; (internal working).
9.how to find nth
element in a singly linked list.
10.How to ensure
the Order of Threads without using wait and notify.
Interview - E
1. Brief
Introduction about yourself and Describe the project and technologies
you have worked on.
2. Difference
between Thread and Process?
3. What are the
parameters to keep in mind to convert a application into
multithreaded application?
4. A batch takes
3hr to complete without multithreading, what will be the impact if 50
threads are run to complete the batch?
5. Given a class
class counter{
int count;
public void
increment()
{
count++
}
}
a. If 2 threads
are run what will be the value of variable count.
b. Is there any
issue in above code.
c. What will
happen if count is declared as volatile
d. How to
resolve the issues of above code.
5. When can we
use only Volatile?
6. What is
deadlock. Write code to generate a deadlock?
7. Write a code
to create deadlock using singelton class?
8. Min
requirement to generate a deadlock(Min objects / Min threads that are
required)?
9. How to create
a synchronized map?
10. Difference
between ConcurrentHashMap and SynchronizedMap?
11. We have 25
reader threads. Which map would you prefer to use in this
scenario.(Hashmap or ConcurrentHashMap or SynchronizedMap)?
12. Write a
program to print 1,2,3,4,5...and so on using Threads. Given when
thread T1 prints only even number and thread T2 prints only odd
number.(Order needs to be sequential).
13. Difference
between LinkedList and ArrayList?
14. When will you
prefer to use linkedlist and when will you prefer ArrayList?
15. Write a code
to generate a node of single linked list?
16. Describe the
benefits of TreeSet?
17. What the
requirements to implement TreeSet for storing custom Objects?
18. Given a
TreeSet<Objects> : Now 2 objects 1 of Employee Class and Other
of Department class are inserted in set. What will be the size of the
set?
19. What do you
mean by StackOverFlowException?
20. Write a code
to generate StackOverFlowException?
No comments :
Post a Comment