Java webservice interview questions

Posted 4 CommentsPosted in Interview questions, Java, WebServices

When to use REST and when to use SOAP ? Use SOAP, when 1) The service provider and client/consumer need to follow a formal contract. The format is provided in the form of a WSDL file. 2) SOAP provides additional features for stateful operations. 3) Security : SOAP provides additional security by using WS-Security. Use […]

Java Collections Interview questions

Posted 3 CommentsPosted in Core Java, Interview questions, Java

Difference between HashTable and HashMap HashMap is not threadsafe whereas HashTable is threadsafe Since HashMap is not synchronized it performs better than HashTable Hashtable does not allow null key, hashmap allows 1null key & several null values Iterator in hashmap is fail-fast. But enum in Hashtable is not fail-fast Fail-fast means if one thread is […]