Default Method

interface A { void show(); } interface A { void show(); } Is it ‘A’ is the valid interface ? Yes since it has only abstract method. interface B { void show(){ System.out.println(“show”); } } interface B { void show(){ System.out.println(“show”); } } Is it ‘B’ is the valid interface ? No because interface should […]

Share this article on

Setter Dependency Injection(SDI) vs Constructor Dependency Injection(CDI)

As we have already understood about SDI and CDI, Now let’s see the differences between Setter Dependency Injection(SDI) and Constructor Dependency Injection(CDI) 1) The way we Inject SDI usually happens after the object gets created by the container and by using the setter methods Whereas CDI happens during the object creation by the container by […]

Share this article on
< Previous Next >