Guys, I'd like to share with the (big) world my modest Java interviewing experience. Here are the questions which I pester job-candidates with:
Object Oriented Programming
Core Java
Object Oriented Programming
- Central idea of Object Oriented Programming in one sentence
- Central idea of Structured Programming in one sentence
Core Java
- Multiple inheritance in Java (classes and interfaces)
- What are the differences between Interface and Abstract Class?
- What final classes in Java SDK you know? Why they are declared final?
- What are the (non-) final methods of Object class? Why?
- How to override Object.clone() method correctly?
- Collections
- What is the difference between ArrayList and Vector?
- How to sort a collection of your own classes?
- [Senior] What sorting algorithm is used in Collections.sort()? Why?
- How to filter out (i.e., remove some items) from ArrayList while iterating through it?
- Exceptions
- Types and the difference
- What kind of exception can you catch?
- Is it safe to catch Throwable?
- Threads
- What are the static and instance methods in a Thread class?
- Why static methods in a Thread class are static and instance method are not?
- What is the difference between Thread.sleep() and someObject.wait() methods?
- What are the immutable objects? When to use?
- [Senior] What are the reasons to use utils in the package java.util.concurrency?
- [Senior] What is a ThreadLocal? How you can use it in production code?
- Serialization
- How to make a class serializable?
- Java IDEs shows us warning if the serializable class doesn't declare static final field of type long, "serialVersionUID". Why to worry?
- Class destruction
- How and when override finalize() method?
- [Senior] How does Garbage Collector work?
- Quirks
- Is it possible to have two object of the given singleton class in one VM? If so - then how?
- Servlets: when servlet is instantiated?
- Servlets: how much servlet' instances of a same class simultaneously live in servlet container?
- Are servlets thread-safe?
- What are the requirements for the Entity?
- Is it necessary to override Entity.equals()? How to implement Entity.equals()? What are the caveats?
- What is lazy loading? Is it dangerous?
- Transform given string "Bob doesn't eat dogs" to the new one "dogs eat doesn't Bob". String.split() usage is prohibited.
- Bubble sorting. Algorithm improvements.
- [Senior] How would you implement thread-safe hash map?
- What a new trick/feature you'd found in Java?
- Which software pattern you are using most? Why?
- Why Multiple inheritance is bad?
- What is the latest IT technology you'd discovered for yourself?
- Which IT achievement you can be proud of?
- Bubble sorting. Unit tests and algorithm improvements
- Modelling computer network. Instances: domains, subdomains, hosts. Operations:add, delete, move, find. Unit tests.
- Echo server and client.
- Modelling animal farm. Instances: pig, cat, dog. Operations: create, feed, sound. Unit tests.
- Modelling computer network. Instances: domains, subdomains, hosts, settings (collection of key-value pairs). Operations: apply setting to host/domain, override set of parameters on host/domain. Unit tests.
- Modelling computer network. Instances: domains, subdomains, hosts. Operations: sort hosts according to their nesting(starting from root).
0 comments:
Post a Comment