lang nach int java 8
import static java.lang.Math.toIntExact;
long foo = 10L;
int bar = toIntExact(foo);
2 Programmers 1 Bug
import static java.lang.Math.toIntExact;
long foo = 10L;
int bar = toIntExact(foo);
public class LongToIntExample2{
public static void main(String args[]){
Long l= new Long(10);
int i=l.intValue();
System.out.println(i);
}
}
long foo = 10L;
int bar = (int) foo;
long a = 200L;
int x = (int)a;