Lambda Expression

It is a shorter way of writing an implementation of a method which we can execute later at some point. Syntax : (arg1,arg2,arg3,…)  -> {body of implementing method}; (arg1,arg2,arg3,…) -> {body of implementing method}; Example 1 : (int x, int y,int z) -> {  return x + y + z; };   (int x, int […]

Share this article on

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
< Previous Next >