Online Java Compiler By
JavaTpoint.com
public class LongToIntExample1{ public static void main(String args[]){ long l=500; int i=(int)l; System.out.println(i); }}
Output