Java

Java Math.pow() method Usage

Java Math.pow() method Usage

Ashish Lahoti

In this quick article, We’ll see usage of Java Math.pow() method which takes two arguments, a and b, and returns a to the power of b i.e. ab

Double Colon (::) Operator in Java 8

Double Colon (::) Operator in Java 8

Method Reference in Java 8

Ashish Lahoti

The double colon :: operator is introduced in Java 8 for method reference. It is a shorthand syntax for lambda expression that executes one method. You can write more compact and readable code using double colon operator as compare to anonymous classes and lambda expression. We are going to understand its usage with lots of examples.