Sunday, October 27, 2019

Interface Versus Abstract Class

- Interface are stateless(no instance fields.).
- Interface provide behavior, not state.
- Abstract classes provide behavior and state.

Lamda Expressions Versus Anonymous Classes


  • Lamdas are more succinct.  
  • Lamdas do not create additional class files.  
  • Not every occurrence of lamda crates a new object.  
  • On the other hand:     
         - Lamdas only work for FIs
         - Anonymous classes can have state(That is, fields)

   

SOLID-Design-Principles

SOLID-Design-Principles The SOLID principles are fundamental to designing effective, maintainable, object-oriented systems. Whether you...