//In java, you can cast to any primitive type by putting (primitiveType) //before whatever you're casting to. private static int myInt = (int)myDouble;