Pergunta de entrevista da empresa GlobalLogic

First Round: 1) What is mutability? Why is String class immutable? 2) What are bean scopes? What are singleton and prototype bean scopes? 3) String reverse using recursion? 4) get and load difference in hibernate? 5) update and merge difference in hibernate? 6) How many Session Factory objects can we have in our application? Why restrict it to one only? 7) Questions related to String pool by having two questions, one using equals method on two string instances with same value ("abc") and other having two Student instances where 1) Student class has nothing 2) Student class has some data members. Second Round: 1) Tell one instance where you there was a design flaw in the project and you have implemented a better design approach and optimised the code using new design. 2) To find the occurence of most repeating word in the file (Need to WAP) 3) Difference between Comparable and Comparator (with Code) 4) WAP for binary search. 5) WAP to swap two numbers without using third variable. Round two requires design experience and knowledge, due to which I did not clear it, even when code answers were implemented. So, for round two, study your projects' design and architecture deeply. All the Best.