This is another set of investment bank java interview questions. This interview was not attended by me but I got this these questions from one of my team mate, who passed these interviews to receive the IB job offer. Here the main focus area were again java collections, memory model, java 1.5 concurrency and design pattern.
Always remember your first impression is the most important and everybody know what is the first question in all interviews. It is 'tell me about yourself' or' tell me about current project'. Be well prepared for this questions which sets the tone for rest of your interview. If you are taking telephonic interview be very clear that your voice should be clear and there should not be any background noise.
1) Tell me about career profile and describe your one of the main project?
then deep drive into the current project.
- Why u are using these technology like JMS, Concurrency, Spring in your application?
- What feathers of java 1.6 you are using in your current application?
- How you r managing concurrency in application?
- How the exceptions are handled in your application?
2) Java collections - When to use ArrayList and Linked list?
Java Collection
3) Application wants to load static data with limited memory foot print and it should be refreshed after regular interval. Implement LRU Cache ?
LRU Cache Implementation
Java Collection
3) Application wants to load static data with limited memory foot print and it should be refreshed after regular interval. Implement LRU Cache ?
LRU Cache Implementation
4) What is soft reference, weak reference, phantom reference?
A weak reference, simply put, is a reference that isn't strong enough to force an object to remain in memory. Weak references allow you to leverage the garbage collector's ability to determine reachability for you, so you don't have to do it yourself. It is used in java.util.WeakHashMap.
A soft reference is exactly like a weak reference, except that it is less eager to throw away the object to which it refers. An object which is only weakly reachable (the strongest references to it areWeakReferences) will be discarded at the next garbage collection cycle, but an object which is softly reachable will generally stick around for a while.
A phantom reference is quite different than either SoftReference or WeakReference. The object is marked for Garbage collection but it is finalised and have not yet reclaimed. The object is called as phantom reachable. Its grip on its object is so tenuous that you can't even retrieve the object -- its get() method always returns null. The only use for such a reference is keeping track of when it gets enqueued into a ReferenceQueue, as at that point you know the object to which it pointed is dead.
7) How to handle out of memory error and what tools we can use to figure out memory leaks?
There are a few new features in Java 1.6, but not many:
- @Override annotations on methods specified by an interface
- NavigableSet, NavigableSet, Deque
Those are the changes that I can think of.
Wait, there's more:
- Pluggable Annotation Processing
- Programmatically access to the compiler through ToolProvider
12) Explain Singleton design pattern and what is double check locking (DCL) and how to make singleton classes using volatile?
Design Pattern [Singleton]
Design Pattern [Singleton]
13) What is the difference between correlated subqueries and uncorrelated subqueries?
Uncorrelated subquery is that the subquery can be run independently of the outer query. Basically, the subquery has no relationship with the outer query.
example :
select * from employee where id in (select employee_id from department where dept_id=10);
Here sub query \ inner query is not dependent on outer query.
Correlated subquery has the opposite property – the subquery cannot be run independently of the outer query.
SELECT *FROM Employee Emp1
WHERE (1) = (
SELECT COUNT(DISTINCT(Emp2.Salary))
FROM Employee Emp2
WHERE Emp2.Salary > Emp1.Salary)
What you will notice in the correlated subquery above is that the inner subquery uses Emp1.Salary, but the alias Emp1 is created in the outer query. This is why it is called a correlated subquery, because the subquery references a value in it’s WHERE clause (in this case, it uses a column belonging to Emp1) that is used in the outer query.
14) If Parent class is Serializable, then Child class should be Serializable classs ?
14) If Parent class is Serializable, then Child class should be Serializable classs ?
yes, a subclass IS-A superclass, and hence child will also be IS-A Serializable too.
However, if the question is referring to an object actually being serializable, then maybe not, as it is possible for a subclass to provide readObject() and writeObject() methods, that thows a NotSerializableException.
Puzzle :
1) You are in one room at 5'th floor of building and it has 3 bulbs and the switch for these bulbs are in ground floor and you can go down only 1 time and Tell me how you know particular switch for each bulb? ,, tip --use bulb heating**
2) You have 1000 teams and each team plays knock out with each other, how many minimum matches we need to schedule to figure out winner?
3) Write the programme to get square root of 100? do not use java math Square root functions?
Management Round:
1) Tell me about yourself?
2) Why you want to leave current job?
3) Why you want to join this bank? ..[Get the history of bank and current CEO details and latest mergers]
4) Your key strengths and weakness?
5) Tell me how you were managing team?
HR Round:
1) Why would you like to leave current role?
2) What is your long term plan, how you would you like to growth your career?
[Answer of these Mgmt/HR Questions are listed here]Overall process took around 1.5 months from first round to final job offer. one more point there was onsite puzzle solving in first round using eclipse and we need to make Junit test cases to demonstrate the understanding of Test driven development.
More interview questions from investment bank job interviews
More interview questions from investment bank job interviews
3) XML Parsing
Banking development work requires analytical skills so you can be surprised by puzzles. Sample puzzles at listed in blog Frequently asked java puzzles.