Interview Questions and Answers for 'Deloitte' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Interview Questions


 2807 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Deloitte


   




Interview Questions and Answers for 'Deloitte' - 41 question(s) found - Order By Newest

next 40
Advanced level question. Frequently asked in High end product companies. Frequently asked in Cognizant and Deloitte ( Based on 2 feedback )
  Q1. Why is String immutable in Java ?Core Java
Anonymous
Ans. 1. String Pool - When a string is created and if it exists in the pool, the reference of the existing string will be returned instead of creating a new object. If string is not immutable, changing the string with one reference will lead to the wrong value for the other references.

Example -

String str1 = "String1";
String str2 = "String1"; // It doesn't create a new String and rather reuses the string literal from pool

// Now both str1 and str2 pointing to same string object in pool, changing str1 will change it for str2 too

2. To Cache its Hashcode - If string is not immutable, One can change its hashcode and hence it's not fit to be cached.

3. Security - String is widely used as parameter for many java classes, e.g. network connection, opening files, etc. Making it mutable might possess threats due to interception by the other code segment.

 Help us improve. Please let us know the company, where you were asked this question :   


   Like      Discuss      Correct / Improve     java   oops   string   string class   immutable   advanced     Barclays  Jungo  Cloudera  Allston  Man Group  Prokarma  Optimus  Gamesys  ABS  TransPerfect  Fidelity  Deloitte  Zalando  Cognizant (CTS)  Zeta Interactive  SuccessFactors   EchoStar  InterGlobe Technologies  HCL Technologies  Intuit  JP Morgan  Optimus Information  Faichi Solutions  Blip  Adobe  Subex Limited  Remo Software  Allstate  IBM  Bizmatics  Bytecode Cyber Security  Calsoft Systems  IDS Infotech  Nakisa      expert        frequent

Try 4 Question(s) Test


Very frequently asked in different variations. Frequently asked in Deloitte ( 2 feedback ) , HCL Tech ( 3 feedback ) and Coginizant (CTS)
  Q2. Explain the scenerios to choose between String , StringBuilder and StringBuffer ?

or

What is the difference between String , StringBuilder and StringBuffer ?
Core Java
Anonymous
Ans. If the Object value will not change, use String Class because a String object is immutable.

If the Object value can change and will only be modified from a single thread, use StringBuilder because StringBuilder is unsynchronized(means faster).

If the Object value may change, and can be modified by multiple threads, use a StringBuffer because StringBuffer is thread safe(synchronized).

  Sample Code for String

  Sample Code for StringBuffer

  Sample Code for StringBuilder

 Help us improve. Please let us know the company, where you were asked this question :   


   Like      Discuss      Correct / Improve     java   string class   string   stringbuilder   stringbuffer     Cognizant (CTS)   San Jose State University (SJSU)  HCL Technologies   Deloitte  Sophos  Hitachi  JPMorgan Chase  IBM  Kony Labs  Keystone  ebay  TIAA Financial Services  Ancestry   Rakuten  Accenture      basic        frequent

Try 3 Question(s) Test


Frequently asked question in companies using Hibernate.
  Q3. What is Lazy Initialization in Hibernate ?Hibernate
Admin
info@buggybread.com
Ans. It's a feature to lazily initialize dependencies , relationship and associations from the Database. Any related references marked as @OneToMany or @ManyToMany are loaded lazily i.e when they are accessed and not when the parent is loaded.

  Sample Code for Lazy Initialization

 Help us improve. Please let us know the company, where you were asked this question :   


   Like      Discuss      Correct / Improve     hibernate   lazy loading hibernate   lazy initialization hibernate   architecture     overstock.com  BridgePoint Technologies  Medgate  Dex Media  Diversant  Tieto  Oracle  Bank of America Merrill LYNCH  NEC Japan  HCL Technologies  Deloitte  Accenture  Infosys  Tata Consultancy (TCS)  Luxoft  Nvidia      Basic        frequent

Try 2 Question(s) Test


Very frequently asked. Favorite question in Walk in Drive of many Indian service companies.
  Q4. What is the difference between ArrayList and LinkedList ?Core Java
admin
info@buggybread.com
Ans. Underlying data structure for ArrayList is Array whereas LinkedList is the linked list and hence have following differences -

1. ArrayList needs continuous memory locations and hence need to be moved to a bigger space if new elements are to be added to a filled array which is not required for LinkedList.

2. Removal and Insertion at specific place in ArrayList requires moving all elements and hence leads to O(n) insertions and removal whereas its constant O(1) for LinkedList.

3. Random access using index in ArrayList is faster than LinkedList which requires traversing the complete list through references.

4. Though Linear Search takes Similar Time for both, Binary Search using LinkedList requires creating new Model called Binary Search Tree which is slower but offers constant time insertion and deletion.

5. For a set of integers you want to sort using quicksort, it's probably faster to use an array; for a set of large structures you want to sort using selection sort, a linked list will be faster.

  Sample Code for ArrayList

  Sample Code for LinkedList

 Help us improve. Please let us know the company, where you were asked this question :   


   Like      Discuss      Correct / Improve     collections   java   data structures   arraylist   linkedlist     Deutsche Bank  Overstock.com  HCL Technologies  Infosys  EBay  The Advisory Board Company  Accuity  JC Penney  Cerner  Chase  Amazon  Deloitte  Deegit  Tata Consultancy  Cognizant (CTS)  IBM  Accenture  Mindtree  ESRI  QwikCilver Solutions  TMC Bonds  GumGum  EMC  Yelp  Classteacher Learning System  FactSet  Simply Hired  SalesForce  Royall & Company  Indeed  eClinicalWorks  TravelClick  State Farm  Manhattan Associates  GoEuro  Veeva Systems  Ness Technologies  Marlabs  Rolta  Volante Technologies  Happiest Minds Technologies  Coviam  Velocify  zanox  SimplyHired  IDBI Intech  Wissen Infotech  Nike  OnDot  PexSupply  Pramati Technologies  Credit Agricole  Mastek  Six Dee Telecom  Accuity  Kellton Tech  conduent  citrix  NEC Technologies      Basic        frequent

Try 1 Question(s) Test


 Q5. Can we serialize static variables ?Core Java
Anonymous
Ans. No. Only Object and its members are serialized. Static variables are shared variables and doesn't correspond to a specific object.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     serialization   java   oops   static   static variables     Deloitte      intermediate        rare

Try 2 Question(s) Test


  Q6. Difference between Vector and ArrayList ?Core Java
Anonymous
Ans. Vectors are synchronized whereas Array lists are not.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   basic interview question   vector   arraylist   collections   synchronization     Oracle  Lab49  Infosys  Wipro  Zoho  HCL Technologies  Tata Consultancy (CTS)  BirlaSoft  Emory  Xplana  British Telecom (BT)  Apex Systems  Capgemini  Accenture  3dplm Software Solution  AppKnox  eIntern  Landmark Information Group  ESystems  Orbitz Worldwide  HARMAN  Starmount  iConsultus  KARYA Technologies  Smart Chip  Cuelogic Technologies  Kronos  Trigent Software  Deloitte  ACI Worldwide  Unisys  Tavant Technologies  Referance data      basic        frequent


Advanced level question. Recently asked in few Indian service companies ( Based on 3 inputs )
 Q7. What are various types of Class loaders used by JVM ?Core Java
Admin
info@buggybread.com
Ans. Bootstrap - Loads JDK internal classes, java.* packages.

Extensions - Loads jar files from JDK extensions directory - usually lib/ext directory of the JRE

System - Loads classes from system classpath.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   jvm   memory management   class loaders   bootstrap   extensions   system  classloaders   advanced   technical lead   technical architect     Deloitte  Mindtree  Accenture  Synechron  IBM  Virinchi Technologies


Very Frequently asked. Usually asked along with String Class related questions.
  Q8. What is an immutable class ?Core Java
Anonymous
Ans. Class using which only immutable (objects that cannot be changed after initialization) objects can be created.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   oops   immutable   immutable class   string class   basic interview question     Cognizant (CTS)  Hybris  YuMe  ebizAutos  Deloitte  HCL Technologies  Tata Consultancy (TCS)  Infosys  Accenture  Overstock.com  Elsevier  Endurance International Group  SynergisticIT  Verizon  Capgemini  Ebay      Basic        frequent

Try 2 Question(s) Test


 Q9. How to implement an immutable class ?Core Java
Anonymous
Ans. We can make a class immutable by

1. Making all methods and variables as private.

2. Setting variables within constructor.

Public Class ImmutableClass{

private int member;
ImmutableClass(int var){
member=var;
}
}

and then we can initialize the object of the class as

ImmutableClass immutableObject = new ImmutableClass(5);

Now all members being private , you cant change the state of the object.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   oops   immutable   immutable class   technical lead     Deloitte  Pramati Technologies  JPMorgan Chase  Mastercard      intermediate        frequent

Try 2 Question(s) Test



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q10. Write an algorithm / Java Program to show duplicates in an array of n elements?Algorithm2017-01-19 15:37:26

Ans. int duplicateArray[] = { 1, 2, 2, 3, 4, 5, 6, 8, 9}
Set unique = new HashSet();
for (int i = 0; i < duplicateArray.length; i) {
if (unique.contains(duplicateArray[i])) {
System.out.println(duplicateArray[i]);
} else {
unique.add(duplicateArray[i]);
}
}

Complexity O(n) = nHashSet contains and add has O(n) = 1

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     coding  code     Deloitte  Bosch


 Q11. What is a binary tree ?Algorithm2017-01-19 15:38:04

Ans. Binary tree is a tree in which each node has up to two children.Tree is a data structure composed of nodes.Each tree has a root node(not necessary in graph theory). The root node has zero or more child nodes.Each child node has zero or more child nodes, and so on.The tree cannot contain cycles.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     binary tree     Deloitte


 Q12. Can we have multiple inheritance in java using abstract class ?Core Java2018-07-04 16:17:49

Ans. No

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     abstract class   multiple inheritance     Deloitte


 Q13. Describe structure of a Web application.architecture2018-07-04 16:18:26

Ans. WEB APP |WEB-INF - META-INF | | | META-INF.MF | lib - WEB.xml - Classes

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     web application     Deloitte      intermediate        frequent


Frequently asked at HCL Technologies ( Based on 3 feedback )
  Q14. Difference between Checked and Unchecked exceptions ?Core Java
Anonymous
Ans. Checked exceptions are the exceptions for which compiler throws an errors if they are not checked whereas unchecked exceptions are caught during run time only and hence can't be checked.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   exceptions   checked exceptions   unchecked exceptions   exception handling   basic interview question     Verilogue  F5 Network  Pegasystems  PegaSystems  SAP  Ciber  Conde Nast  Pramati Technologies  IBM  JP Morgan  HCL Technologies  Tata Consultancy (TCS)  Cognizant (CTS)  Cogent Infotech  MarketAxess  defense group  NETS INTERNATIONAL  Accenture  Integra Micro  ColdLight Solutions  Endeavor  Deloitte  Infosys  Jean Martin  Symantec  Ancestry  Overstock.com  Adobe  Ultimo  CRIF  Sapeins  Flexera  Sofi  Morgan Stanley  Barclays      basic        frequent

Try 1 Question(s) Test


Very Frequently asked. Favorite question in walkins and telephonic interviews. Usually among first few questions. Asked in different variants. Must know for intermediate and expert professionals.Among Top 10 frequently asked questions.
  Q15. What is rule regarding overriding equals and hashCode method ?Core Java
Admin
info@buggybread.com
Ans. A Class must override the hashCode method if its overriding the equals method.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   collections   hashcode  hash code   equals   collections     Cognizant (CTS)  CapitalOne  Tata Consultancy (TCS)  HCL Technologies  Deloitte  Wipro  Infosys  Sabre  Sophos   Tieto  Addteq  Priceline.com  Cisco Systems  Visa Inc  Vibrant Media  Audience Science  GT Nexus  OpenCrowd  Instinet  Kronos  Elsevier  IMC Financial  LG Mobile  Dun & Bradstreet  WBUT  codecentric  Satmetrix  Interactive Brokers  Roposo  SecureView  Azuga  Envestnet  Criteo  Skillz  MobileIron  Walmart  R Systems  Overstock.com  Verilogue  Goldstone Technologies  FatWire  LinkedIn  Southwest Airlines  Crossover for Work      intermediate        frequent

Try 1 Question(s) Test


  Q16. Can we have null keys in TreeMap ?Core Java
Admin
info@buggybread.com
Ans. No, results in exception.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   collections   treemap     Visa  Prokarma  Sabre  Polaris  Deloitte  Cognizant (CTS)      Basic        frequent


Very frequently asked. Usually followed by questions related to private constructor and synchronized access. Frequently asked in JPMorgan and TCS (Based on 2 feedback)
  Q17. Explain Singleton Design Pattern ?Design
Admin
info@buggybread.com
Ans. http://www.buggybread.com/2014/03/java-design-pattern-singleton-interview.html

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   design pattern   singleton   at&t   ebay  fidelity india  united healthcare india     JP Morgan  Tata Consultancy (TCS)  HCL Technologies  Wipro  Infosys  Tibco  Edline  JPMorgan Chase  Sabre  Bank Of America India  Fidelity  Samsung India  Robert Bosch India  ZapCom  Goldman Sachs India  Eze Software  ZapCom  Dailymotion  Netflix  CenturyLink  Misfit  TSYS  ECI Telecom  Dealogic  Robert Bosch  Redolent  EFI  CSX  Prolific  Validus  Birlasoft  AdNovum  NCR  Ray Business Technologies  Nagravision  Unify  SLK Group  DBS Bank   Razorthink  GST Global  USAA  Ray Technologies  Ray Business Technologies (Raybiztech)  Raybiztech  Deloitte      intermediate        frequent


 Q18. What is ConcurrentModificationException ?Core Java
Admin
info@buggybread.com
Ans. This is the exception that is thrown when we try to modify the non concurrent collection class while iterating through it.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   collections   concurrentmodificationexception   exception  concurrency     Calypso Technology  Deloitte  IRIS Software      intermediate


 Q19. What is ArrayIndexOutOfBoundException ?Core Java
Admin
info@buggybread.com
Ans. Exception thrown by the application is we try to access an element using an index which is not within the range of array i.e lower than 0 or greater than the size of the array.

 Help us improve. Please let us know the company, where you were asked this question :   


   Like      Discuss      Correct / Improve     java   exceptions   arrayindexoutofboundexception     Deloitte



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



  Q20. Difference between jar , war and ear ?Java EE
Admin
info@buggybread.com
Ans. Jar is Java Archieve i.e compressed Class or Class / Java files.

War comprises of compressed Servlet class files,JSP FIles,supporting files, GIF and HTML files.

Ear comprise of compressed Java and web module files ( was files ).

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   j2ee   jar   web development   war   ear   build management   release management     Sirius Computer Solutions  HCL Technologies  Wipro  Deloitte  Tech Mahindra  eGain  Southwest Airlines  Aveiro  Accenture  MIMOS Berhad  Oodles Technologies      basic        frequent


  Q21. What is Jenkins ?Jenkins
Admin
info@buggybread.com
Ans. It is a continuous integration tool written in Java.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   jenkins     Lithium Technologies  Adtech  Deloitte  Netcracker Technology  Alcatel Lucent  American International Group (AIG)      Basic        frequent


 Q22. What are the disadvantages of multithreading ?Core Java2016-10-11 08:47:41

Ans. 1. Switching Overheads - Even though multi threading aims at improving performance by reducing the wait time and hence improving overall throughput, there is a cost of switching resources between threads and sometime this cost can surpass the benefits if there isnt much wait for IO or external communication.

2. Debugging is hard with multi threaded code.

3. Deadlock - Execution of multi threaded code many a times lead to deadlock due to shared resources.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     multithreading  threads     Cognizant (CTS)  Wipro  Deloitte  IBM


Very frequently asked.
 Q23. What is the use of synchronized keyword ?Core Java2016-11-04 08:15:53

Ans. Synchronize is used to achieve mutual exclusion i.e at one time, the segment of the code, method that has been declared synchronized should be executed by single thread only and hence the lock needs to be retrieved before executing the segment and then released.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     threads  multithreading  synchronized     CapitalOne  Deloitte  JP Morgan  Morgan Stanley  JP Morgan      basic        frequent


Frequently asked in high end product companies. Frequently asked in Deloitte.
  Q24. How is Hashmap internally implemented in Java ?Core Java2016-12-06 08:49:37

Ans. https://www.quora.com/How-is-Hashmap-in-Java-implemented-internally-What-are-the-pros-and-cons-to-use-it-What-are-the-complexities-it-provides-for-insert-delete-and-lookup/answer/Anshudeep-Bajpai?srid=iwnK

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     hashmap  collections  hashmap internal implementation     Veritas  Sophos  Salesforce  United Health Group (UHG)  Priceline.com  Roposo  virtusa polaris  Tata Consultancy (TCS)  Hexaware Technologies  Shiksha Infotech   Synechron  Anand Rathi  Virtusa   CenturyLink  Kasmo Cloud Solutions  Dark Horse  Deloitte      expert        frequent


  Q25. What is an exception and exception handling in Java ?Core Java2017-01-09 13:01:40

Ans. An Exception in java is the occurrence during computation that is anomalous and is not expected.

Exception handling is the mechanism which is used to handle such situations.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     exception handling     EPAM  Deloitte  Choice Hotels  Future Group  Cognizant (CTS)  Wipro  Infosys  HCL Technologies  Accenture  Amdocs  IBM  Ultramain Systems  Jean Martin  Tata Consultancy (TCS)  GE Digital  At&t      basic        frequent


 Q26. Write an algorithm / java program for Heap Sort ?Algorithm2017-01-19 15:36:18

Ans. https://www.geeksforgeeks.org/heap-sort/

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     sorting  heap sort     Deloitte        frequent


Usually asked to entry level software developers.
  Q27. Write a program to swap two variables without using thirdCore Java2017-01-19 15:38:34

Ans. public static void main(String[] args) {
   int num1 = 1;   
   int num2 = 2;
   num1 = num1^num2;
   num2 = num1^num2;
   num1 = num1^num2;
   System.out.print("num1 = " + num1 +", num2 = "+num2);
}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     code  coding     Deloitte  Colgate Palmolive  Tech Mahindra  SAP  Broadcom  Tata Consultancy (TCS)  Wipro  Gemalto  Time op  Nse Tech  Client Network Services  Monte Carlo  BrainMobi Technologies  Nokia  Minted LLC  Societe Generale  MetricStream  Sapient Global  HighRadius  Mindtree  Robert Bosch  Cypress Semiconductor  Tesco  NTT Data  Tejora Technologies  Saggezza  Elegant Microweb  AMD  Advanced Micro Devices  Tricon Infotech  Odessa Technologies  Aditi  Max Secure Software India  NetSuite  Volante Technologies  Subex Limited  Plintron Global Technology Solutions      basic        frequent


Frequently asked Spring interview question.
 Q28. What are the components of Spring framework ?Spring2017-02-06 11:57:01

Ans. Core: [Core, Bean, Context, Expression Language]

Web: [Web, Portlet, Servlet, etc]

Data Access [JMS, JDBC, etc]

AOP, Aspect

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     spring  spring framework components     Deloitte  NZone  L&T Infotech  Ocean Consulting


 Q29. Is HttpServlet an abstract class ?Java EE2018-02-19 13:09:49

Ans. Yes

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve          Deloitte



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q30. Create a stack of specific size using arrayList?Data Structure2018-04-04 21:33:45

 This question was recently asked at 'Deloitte'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve          Deloitte


  Q31. Write code to sort an array.Algorithm2018-07-04 16:15:16

 This question was recently asked at 'Deloitte,Match,Ebates,Google,Zento,Zillow,UXP Systems,HCL Technologies,Infosys,IDEMIA,Optym,Groupon,Tata Consultancy (TCS),Arbeiten bei Zeus,Accenture'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     array  sorting     Deloitte  Match  Ebates  Google  Zento  Zillow  UXP Systems  HCL Technologies  Infosys  IDEMIA  Optym  Groupon  Tata Consultancy (TCS)  Arbeiten bei Zeus  Accenture      basic        frequent


  Q32. Difference between == and === ?JavaScript2018-07-04 16:16:18

Ans. == compares values === is used in scripting languages for comparing two values as well as there data tpe. like in js,php.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     ==  ===  == vs ===     Symantec  Deloitte  At&T  Microsoft  Schweitzer Engineering Laboratories  ADP  Splunk  HCL Technologies  Tata Consultancy (TCS)  Accenture  Salesforce  Amdocs      basic        frequent


 Q33. What is the difference between abstraction and abstract class ?Core Java2018-07-04 16:17:01

Ans. Abstract class is one of the facility for achieving abstraction in Java.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve          Deloitte


 Q34. Write code to print a Pyramid pattern ?Core Java2018-07-04 16:19:52

 This question was recently asked at 'Deloitte'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve          Deloitte


 Q35. If your application has multiple databases, how many changes you have to made in Hibernate? Hibernate2018-07-04 16:21:07

Ans. If you have mulitple Databases you just need to add multiple configuration files and create the corresponding SessionFactory object.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve          Deloitte


 Q36. If SOAP is more secure than Rest, Why many applications today use Rest ?Web Service2018-07-04 16:21:38

Ans. SOAP supports only xml whereas Rest support many other formats.

Rest services are very light weight compared to SOAP.

SOAP services are code heavy as they require creation. of stubs and skeltons.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     soap  rest  soap vs rest     Deloitte


 Q37. What are different types of IOC containers ?Design2018-07-04 16:22:36

Ans. J2ee Web Containers and Core Containers

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve          Deloitte


 Q38. How to sort objects based on one of the field ?Core Java2018-07-04 16:23:09

Ans. Using comparable and comparator and sorted collections like TreeSet or TreeMap.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     sort  sorting  comprator  comparable  treeset  treemap  sorting collections     Deloitte      Basic        frequent


 Q39. Given an Employee Table with Salary Column, Find 2nd and 5th highest salary in a particular department.SQL2018-07-04 16:23:54

Ans. Select salary from (select salary from employee where department = order by salary desc limit 5) emp order by salary limit 1 AND Select salary from (select salary from employee where department = order by salary desc limit 2) emp2 order by salary limit 1

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     sql  database   find 2nd highest salary sql database     Deloitte



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q40. Difference between Component-Scan and @Component annotation ? Spring2018-07-04 16:24:28

Ans. @component mark a java class as a bean so that component scan mechanism of spring pick it up and register in IOC container.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve          Deloitte


next 40


Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

Deloitte: When Negotiating salary, better expect 20-30% from ... Anonymous

Deloitte: Be Aware of their Leave Policy. Though ... Anonymous

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: