java import the math lib methods in static

java import the math lib methods in static
re‮ ref‬to:lautturi.com
/**
 * @author lautturi.com
 * Java example: import methods in static  from library
 */

import java.util.*;
import static java.lang.Math.sqrt;

public class Lautturi {

	public static void main(String[] args) {

		int num = 2;
		System.out.println("The number is: " + num);
		System.out.println("The square root of " + num + " is: " + sqrt(num));

	}
}

output:

The number is: 2
The square root of 2 is: 1.4142135623730951
Created Time:2017-09-12 07:32:28  Author:lautturi