Online Java Compiler By
JavaTpoint.com
public class AddExactExample2 { public static void main(String[] args) { long a = 835; long b = -1573; // Input two values, Output addition of a and b System.out.println(Math.addExact(a, b)); } }
Output