What is the main difference between an ArrayList and a Vector? What is the main difference between HashMap and Hashtable?

Vector / Hashtable ArrayList / HashMap Original classes before the introduction of Collections API. Vector & Hashtable are synchronized. Any method that touches their contents is thread-safe. So if you don’t need a thread safe collection, use the ArrayList or HashMap. Why pay the price of synchronization unnecessarily at the… Continue reading

When to use an interface?

For polymorphic interface inheritance, where the client wants to only deal with a type and does not care about the actual implementation use interfaces. If you need to change your design frequently, you should prefer using interface to abstract. Coding to an interface reduces coupling and interface inheritance can achieve… Continue reading

The Three Pillars of Object-Oriented Programming

Object-oriented programming is built on three sturdy pillars: encapsulation, specialization, and polymorphism. Encapsulation: Each class should be fully encapsulated, that is, it should fully define the state and responsibilities of that type. For example, if you create an Employee object, that Employee object should fully define all there is to… Continue reading

Differences between Agile and traditional SDLC

The figure “Agile and traditional SDLC” points out some of the main differences. If you have worked on both these, you can point out more differences. Lengthy requirement documents are now simple and short user stories. Estimation unit man days and man hours are now ideal days and ideal hours,… Continue reading

Explain the XP(Extreme Programming) development life cycle

The XP development cycle consists of two phases: ‘Release Planning’ and ‘Iteration Planning’. In release planning, we decide what should be delivered and in what priority. In iteration planning, we break the requirements into tasks and plan how to deliver those activities decided in release planning. The below figure ‘Actual… Continue reading