Online Java Compiler By
JavaTpoint.com
public class ToIntExactExample2 { public static void main(String[] args) { long a = -829; System.out.println(Math.toIntExact(a)); } }
Output