java interview with Investment bank -4


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?
If we require random access in collection and We have more read compare to updates we should go for Arraylist. Linked list is good for more updates and removals from collection.
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 is related to removal of cache which is not used for maximum time.
LRU Cache Implementation

4) What is soft reference, weak reference, phantom reference?
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.
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.
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.

5) How is memory management in java? how the heap is divided in different area?
Mainly heap is divided into Young generation, Old\Tenured Generation and Permanent Generation area.
Java Memory Mgmt

6) Where String literals are stored in heap?
They are stored in String pools in Permanent memory area.
Java Memory Mgmt

7) How to handle out of memory error and what tools we can use to figure out memory leaks?

8) What is Synchronization and locks in java 1.5?
Java 1.5 features

9) Explain new features in java 1.5 and java 1.6?
Java 1.5 features

There are a few new features in Java 1.6, but not many:
  • @Override annotations on methods specified by an interface
  • NavigableSetNavigableSetDeque
Those are the changes that I can think of.
Wait, there's more:
  • Pluggable Annotation Processing
  • Programmatically access to the compiler through ToolProvider 


10) How to do thread scheduling in java 1.5?
Java Concurrency

11) What are new concurrency classes in java 1.5?
Java Concurrency

12) Explain Singleton design pattern and what is double check locking (DCL)  and how to make singleton classes using volatile?
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 ?
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

Important topic to prepare for Java interview:
1) JAVA 1.5 details


Few More common interview questions

  1. What is true about final class?
1) final class can't be extended .
2) A final method can't be overridden when its class is inherited.
3)You can't change value of a final variable (is a constant).

  1. 2,3 is correct
  2. Only 1 is correct
  3. 1 & 2 is correct
  4. 1, 2 & 3 is correct

Ans : D

  1. What if the static modifier is removed from the signature of the main() method
  1. Compilation Error
  2. Runtime Error
  3. No issues
  4. Not possible in java

Ans : B  runtime throws an error "NoSuchMethodError".

  1. When a class defines a method using the same name, return type, and arguments as a method in its superclass.  This concept is called?
  2. Overriding
  3. Overloading
  1. Inheritance
  2. Association

Ans :  A

  1. In Java Objects are passed to method by?
  1. Passed as referece
  2. Passed as Value
  3. Passed referece as Value
  4. Both referece and Value is passed
Ans : C


  1. What is use of Externalizable interface
  1. Multithreading
  2. Exception handling
  3. Serialization
  4. IO operation

Ans : C

  1. What will be output of this code

 try{
          System.exit(0);
}
Catch(Exception e){
E.printstacktrace()
}
Finally {
System.out.println(" Finally Block");
}

  1. SOP as "Finally Block"
  2. Runtime Exception
  3. Compilation Error
  4. Program executes without any output

Ans : D


  1. . How many objects are created in the following piece of code?
MyClass c1, c2, c3;
c1 = new MyClass ();
c3 = new MyClass ();
  1. Three Objects
  2. Two Objects
  3. No Objects
  4. One Object

Answer : B

  1. How the values are stored in HashMap for particular Key
  1. Using ArrayList
  2. Using LinkedList
  3. Using Object Arrays
  4. Using Set

Answer B

9)Why does _jspService() start with an ‘_’ but other lifecycle methods do not?

               A)This is special method for JVM to run
  1. If it is override, the compiler gives an error
  1. We rename to jspService()
  2. None of above



26. What would be the result of 3+2+”7″ in java script?

  1. 12
  2. 57
  3. 5
  4. 7










54 comments:

  1. very nice. for more java examples, visit, http://java2novice.com site

    ReplyDelete
    Replies
    1. I am prepare ibps po & cwe clerk exams. so i want know which is best for preparation of ibps bank online preparation test ?

      Delete
    2. Tks very much for your post.

      Avoid surprises — interviews need preparation. Some questions come up time and time again — usually about you, your experience and the job itself. We've gathered together the most common questions so you can get your preparation off to a flying start.

      You also find all interview questions at link at the end of this post.

      Source: Download Ebook: Ultimate Guide To Job Interview Questions Answers:

      Best rgs

      Delete
  2. Hello sir
    please Update the page & provide Me the latest info about the Bank Interview Questions and Answers 2014. please sir send me the information for apply some bank exams .....

    ReplyDelete
  3. The info about the PIC was amazing and I got many interesting fact that have never been read before. I want to share this information to my friends. Singapore PIC Scheme

    ReplyDelete
  4. A list of few more java interview questions like

    1. By default, Java is pass by reference or pass by value. how it handles it.

    2. In which scenario, you will use custom exceptions in java.

    3. how garbage collection works in java

    Check more information on java interview questions and tutorials

    ReplyDelete

  5. A list of few more java interview questions like

    1. By default, Java is pass by reference or pass by value. how it handles it.
    2. In which scenario, you will use custom exceptions in java.
    3. how garbage collection works in java
    4. what is autoboxing and unboxing in java
    5. how hashmap works in java

    For more questions:
    Check more java interview questions

    ReplyDelete
  6. Very Useful. For more examples visit http://answersz.com

    ReplyDelete
  7. Amazing Tutorials..Plz visit my tutorials as well..

    http://javanoobs365.blogspot.in/p/home.html

    Best java tutorials..
    Refresh your JAVA..

    Object oriented Programming Tutorial- https://www.youtube.com/playlist?list=PLDCOpt1-gy0kqlAWVivj7CE-ZpKwb3yCu
    Java Basics Part 1 Tutorial- https://www.youtube.com/playlist?list=PLDCOpt1-gy0nyMjsiWN7xqnglUppKPL7T

    ReplyDelete
  8. I Found E-Tutorial, E-Learning and Job on www.hub4tech.com. This portal is excellent for Technical Skills Development and jobs.This Portal is also provide Online test paper

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Its very beneficial blog. this is very useful for everyone. Want a more latest job vacancies update. Visit Here

    ReplyDelete
  11. Tks very much for your post.

    Avoid surprises — interviews need preparation. Some questions come up time and time again — usually about you, your experience and the job itself. We've gathered together the most common questions so you can get your preparation off to a flying start.

    You also find all interview questions at link at the end of this post.

    Source: Download Ebook: Ultimate Guide To Job Interview Questions Answers:

    Best rgs

    ReplyDelete
  12. Hello Everybody,
    My name is Mrs Sharon Sim. I live in Singapore and i am a happy woman today? and i told my self that any lender that rescue my family from our poor situation, i will refer any person that is looking for loan to him, he gave me happiness to me and my family, i was in need of a loan of S$250,000.00 to start my life all over as i am a single mother with 3 kids I met this honest and GOD fearing man loan lender that help me with a loan of S$250,000.00 SG. Dollar, he is a GOD fearing man, if you are in need of loan and you will pay back the loan please contact him tell him that is Mrs Sharon, that refer you to him. contact Dr Purva Pius,via email:(urgentloan22@gmail.com) Thank you.

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete
  14. Almost provided the true values and ideas which candidate may find more eventful for their interview also they will get to know about more important aspects later on when they could able to join such principles by all means. interview preparation services

    ReplyDelete
  15. ITJobBoard is exploring the best employment opportunities in India. As an employment network with direct contact to thousands of employers in India we bring employees and employers together with our employment services in the field of Information Technology. It is one of the most comprehensive employment website for Web developer, web designers, software engineers etc.
    Web Developer Jobs

    ReplyDelete
  16. I love all the posts, I really enjoyed, I would like more information about this, because it is very nice., Thanks for sharing.
    happy wheels , agario , happywheels , agar ,

    ReplyDelete
  17. Thanks for your informative article. Android SDK allows you to create stunning mobile application loaded with more features and enhanced priority. With basis on Java coding language, you can create stunning mobile application with ease. Best Android Training in Chennai

    ReplyDelete
  18. This was worth reading article, java is no doubt the most powerful programming languages yet more demanding as well. J2EE Training in Chennai | JAVA Training in Chennai

    ReplyDelete
  19. Thanks for giving Good Example.
    Fantastic article, Viral. Very well written, clear and concise. One of the best links explaining one to many and hierarchy Hibernate. Thanks a lot.It is uaefull to me and my training Hibernateonlinetraining center.

    ReplyDelete
  20. I agree with your post. Android software development kit makes the application development process lot simpler and effective. You can create best performing android application with ease. Android Training Institutes in Chennai | Android Training in Chennai

    ReplyDelete
  21. Thanks for giving Good Example, It is very useful to us.
    Fantastic article, Viral. Very well written, clear and concise. One of the best links explaining one to many and hierarchy Hibernate. Thanks a lot.It is uaefull to me and my training Hibernateonlinetraining center.

    ReplyDelete
  22. Thanks for giving such a great information with your great article.
    Upcoming Bank Exams | IBPS Clerk Info

    ReplyDelete
  23. I am really inspired along with your writing abilities as well as with the format to your weblog.
    Is this a paid theme or did you customize it your self? Anyway stay up the nice quality writing, it is rare to peer a nice weblog. like this one today.. PHP Training in Jalandhar

    ReplyDelete
  24. Tks very much for your post.

    Avoid surprises — interviews need preparation. Some questions come up time and time again — usually about you, your experience and the job itself. We've gathered together the most common questions so you can get your preparation off to a flying start.

    You also find all interview questions at link at the end of this post.

    Source: Download Ebook: Ultimate Guide To Job Interview Questions Answers:

    Best rgs

    ReplyDelete
  25. thanks for sharing good knowledge

    ReplyDelete
  26. Java Interview Questions

    Thanks for sharing useful information related to java interview questions.

    ReplyDelete
  27. Your website is wonderful, let alone the content material
    interview preparation online

    ReplyDelete
  28. Thanks for sharing more information on java. This is helpful for the my search job that is java jobs in hyderabad

    ReplyDelete
  29. I just see the post i am so happy to the communication science post of information's.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be replay for your great thinks and I hope you post again soon...
    Software Testing Training in Chennai

    ReplyDelete
  30. This comment has been removed by the author.

    ReplyDelete
  31. I just see the post i am so happy to the communication science post of information's.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be replay for your great thinks and I hope you post again soon...
    Java Training in Chennai

    ReplyDelete
  32. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android training in chennai
    Ios training in chennai

    ReplyDelete
  33. Thanks for regularly updating the job requirements. Hope that candidates get the job. Also do check our job website http://JobsMicro.com which has job for all categories.

    ReplyDelete


  34. I have seen lot blogs and Information on othersites But in this Java Blog Information is very useful thanks for sharing it........

    ReplyDelete
  35. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  36. You should also check out Jobs Micro. This is a leading Job search website in India which benefits both the employees and the employers. Hope it helps you.

    ReplyDelete
  37. Valuable for information if there is any other regarding this kindly revert me back on this Jobs in Java

    ReplyDelete
  38. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  39. Very informative article... thanks for sharing your valuable time and information... keep rocks...

    Java Training in Chennai

    ReplyDelete
  40. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
    www.mcdonaldsgutscheine.net/ | www.startlr.com/ | www.saludlimpia.com/

    ReplyDelete
  41. nice blog. thanks for sharing valuable information. It’s really good.Any one looking software courses nareshit is the best offline and online software training institute in Hyderabad and Chennai.

    ReplyDelete