Here are the questions asked in above interview. what is immutable class? How can you write a custom class as immutable? How can you able to sort out the data available in a list of employees on basis of employeeName and employeeAge? How can you sort out the above data on basis of empDept and if same dept, then sort out on basis of empName.How can you do so? what is the difference between HashSet and LinkedHashSet? what is the default sorting order in TreeMap? what is the diff. between wait and sleep? what are the bean scopes available in spring? what is the diff. between prototype and request scope in spring? what is cascade attribute? what are the options available for CASCADE?
@SwatiPatelnz5 жыл бұрын
Thank you!
@trafotrymisspccreations11314 жыл бұрын
Thanks
@hireme38646 жыл бұрын
The interviewer should answer his own question, and not interview with their own theory. You can only sort on one field, but you can group-by other sorted fields. Queston back to interviewer(This will buy time so that you can start thinking and get some clarification) 1. asc or desc order, you get totally 4 different combinations to sort on two fields. 2. What order (you can sort on name first and then age or vice versa) 3. What is the use case (To buy time) HttpRequest scope Mark mark1 = context.getBean("mark"); Mark mark2 = context.getBean("mark"); mark1 == mark2; //This will return true Prototype scope Mark mark1 = context.getBean("mark"); Mark mark2 = context.getBean("mark"); mark1 == mark2; //This will return false What kind of project? He did not answer What will be the next step? One more round of interview!!!..what the hell..that's all is the answer? People who are looking for a job are not bitches, they deserve a decent response. "he comments its ok" ..Interviewer thinks he is king. He cannot answer two simple questions. Put yourself in other person shoes.
@PramodKumar-kg3sd5 жыл бұрын
Hee is the solution for that Sorting by 2 field question - stackoverflow.com/questions/6850611/sort-a-list-of-objects-by-multiple-fields
@bpatel83877 жыл бұрын
very helpful. please keep posting. thanks
@amitsethi10087 жыл бұрын
Fresher or experience?
@sagarmane94315 жыл бұрын
Sorting quation is tricky...I like it ...use caparator
@aayushsaini93636 жыл бұрын
Linked hash set uses linked list + hash table as data structure