Interview Questions

These are a list of few interview questions I was asked during different occasions.
  1. What is the difference between interface and abstract class?
  2. How to create a Java class which can have only one object?
  3. Is it possible to access the cookie of any other domain?
  4. Is there any restriction in number of connections from a single web page?
  5. What is a kernel?
  6. What are thread-safe methods?
  7. What is deadlock and when does one arrive?
  8. Explain Pigeon hole principal.
  9. Given n integers of size 8-bits, write a program to find the minimum difference between them.
  10. Given a binary tree with values in its nodes, write a program to sum the values of nodes within height k.
  11. How to use grep command to search files which contains the string ‘cat’ in its file name?
  12. What is the purpose of explain command in MySql?
  13. Is it possible to start a new Activity using Intents during start-up?
  14. What is the service used to load other services during booting of the Android device?
  15. What is the algorithm behind Java’s GC?
  16. Why is HTTP stateless?
  17. How do you implement chaining of methods as in jQuery?