Java Check whether the number is an integer

Java Check whether the number is an integer
refer‮tual:ot ‬turi.com
/**
 * @author lautturi.com
 * Java example: Check if a number is an integer or not
 */

import java.util.*;

public class Lautturi {

	public static void main(String[] args) {

		int num = 3;
		if (num == Math.floor(num)) { 
			System.out.println("the number "+num+" is an integer");
		}
		
		double db = 3.14;
		if (db != Math.floor(db)) { 
			System.out.println("the number "+db+" is not an integer");
		}
        
	}

}

output:

the number 3 is an integer
the number 3.14 is not an integer
Created Time:2017-08-30 10:02:45  Author:lautturi