convert double into int type in java

convert double into int type in java
refer t‮al:o‬utturi.com
/**
 * @author lautturi.com
 * Java example: converting double to int
 */

import java.util.*;

public class Lautturi {

	public static void main(String[] args) {

		double num = 3.1415;
	    System.out.println("The double value: " + num);

	    int data = (int)num;
	    System.out.println("The integer value: " + data);

	}
}

output:

The double value: 3.1415
The integer value: 3
Created Time:2017-09-21 13:20:11  Author:lautturi