Tuesday 20 September 2011

Web Services Questions

Here we go:

  • Explain web services architecture (publish-find-bind).
  • What are the types of web services?
  • What is SOAP? Name two types of SOAP web services used.
  • What are the two approaches to create SOAP web services?
  • What is WSDL? Why would you need it?
  • What is the difference between DOM and SAX in JAXP?
  • Would you say JAXB is the best for performance? If not what is?
  • What is contract first? Where do you start?
  • What options do you have for security in Web Services?
  • In RESTful Web Services, what is the difference between POST and PUT?
  • Can you use GET instead of PUT to perform an update?
  • Name different output format that REST supports.
  • How do you handle errors in RESTful web services? Describe the options, the advantages and disadvantages.

Sunday 18 September 2011

Hibernate Questions

Here we go:

  • What is ORM?
  • What are the main advantages of using Hibernate?
  • How do you configure Hibernate?
  • What causes LazyInitializationException? What steps do you need to prevent this from happening?
  • What is OpenSessionInView pattern in Hibernate and when would you want to use it?
  • What is SessionFactory? Is it thread safe?
  • What is a Session? Can you share session object between threads?
  • What is HQL?
  • Name 3 inheritance mapping strategy and describe the limitations of each.
  • What do you think of using hibernate's own connection pooling algorithm?
  • Name the core interfaces of Hibernate framework.
  • What is the difference between session.load() and session.get()
  • What is the difference between session.saveOrUpdate() and session.merge()
  • What is a detached object? What other instance states does Hibernate have?
  • When would you use inverse in Hibernate?
  • What is the difference between join and select fetch strategy?
  • What are the advantages of using Hibernate vs JDBC?
  • What are the main differences between Hibernate and EJB?

Core Spring Questions

Spring questions:

  • Describe the life cycle of a bean in Spring.
  • What is the difference between singleton and prototype bean? Give an example when you would want to use one or the other.
  • What are the advantages of using Spring?
  • What are the main features of Spring?
  • What is Dependency Injection/IOC?
  • What are the three types of dependency injection? Which ones do Spring support?
  • Name all the 7 modules of Spring and describe what they are.
  • What's Bean Factory? What's Application Context? Describe the differences and when would you want to use one or the other?
  • What is auto wiring? Name all five modes.
  • Name two ways of accessing Hibernate using Spring.
  • What is AOP?
  • What is Aspect?
  • What is JointPoint?
  • What is Advice? Name 5 type of Advice.
  • Why use declarative over programmatic transaction management?
  • What are the main differences between EJB CMT and Spring's declarative transaction management?
  • Does Spring's transaction management support transaction context over remote calls?
  • Describe the main differences between EJB and Spring.

Saturday 17 September 2011

J2EE Questions

Continuing from last post with basic questions, it's time for J2EE questions:
  • What is J2EE?
  • What are the 4 J2EE components?
  • What is multi tiered architecture?
  • What is the difference between a 3 tiered architecture and 3 layered architecture?
  • What is a J2EE container? What 7 services does it provide?
  • Describe JAR, WAR and EAR files.
  • What is EJB and what is its role?
  • What are the main differences between EJB 2.1 and EJB 3.0+?
  • What's the difference between Session Bean, Entity Bean, and Message Driven Bean and give an example where each should be used.
  • When would you want to use Stateful Session Bean?
  • What is the difference between Bean Managed Persistence (BMP) and Container Managed Persistence (CMP)?
  • What is deployment descriptor?
  • What is the role of JNDI?
  • What problems can you see using Java enum persisted in a database?

Friday 16 September 2011

Core Java Questions

After nearly a decade in Java world, it is time to think about the basics (most people say Core Java). Anyone that has been in the Java industry for a long time should know the answer to all of the following questions, and if not, it is time to refresh your memory and maybe get excited again on what made you like Java in the first place. I'm not going to provide the answers since they are just a Google away, so here we go:
  • What is the difference between ArrayList and Vector?
  • What are the differences between Comparable and Comparator?
  • Name design patterns that you use in Java. Give some examples.
  • Implement a Singleton design pattern in Java. Why Singleton? Is the Singleton class that you created thread safe? What about the clone() method?
  • What are the differences between Heap, Perm and Stack space?
  • Explain how HashMap works in Java. Which method/s are used when put() or get() is called? What is the benefit of having immutable keys in HashMap?
  • Explain how Java Garbage Collection works. Explain in terms of young generation, survivor 1 and 2, tenured generation and permanent generation. Can you force garbage collection?
  • What JVM memory tuning options can you use to improve performance?
  • Explain how Serialization works in Java. Include methods that are involved during the serialization/deserialization. What is serialVersionUID? What could happen when serialVersionUID is missing?
  • What's so special about declaring a variable in a Java interface?
  • What is the difference between executing run() and start() in Java thread?
  • Explain why String is immutable? If it weren't, what would be the implications?
  • Can you write an immutable object?
  • What is the difference between creating String using new() and literal?
  • What is the difference between Enumeration and Iterator?
  • Explain deadlock. What would you check in the code that might cause deadlocks?
  • Explain Checked and Unchecked Exception.
  • When is finalize() method called?
  • Explain transient modifier.
  • Explain volatile modifer.
  • What is the difference between public, private and default?
  • What is operator precedence in Java?
  • What is the difference between abstract class and interface?
  • What is the difference between method override and method overload?
  • Explain polymorphism, inheritance, and encapsulation.
  • What is a wrapper class?
  • Explain autoboxing
  • Why would you use synchronized block instead of synchronized method?
  • What is the difference between method wait() and sleep()?
  • What is the difference between & and && operator?
  • What is the difference between >> and >>> operator?
  • In JDBC, which one is faster, Statement or PreparedStatement? Why?
I will be adding more questions later. Stay tuned!
Share |