Arithmatic Operation in Java : One of the interview question-
Assume that i have one arithmatic function which will add two long variable and the return type also long. If pass Long.MaxValue() as argument it wont give perfect result.what will be the solution for that.Code is below-


` public class ArithmaticExample {

	public static void main(String[] args) {

		System.out.println(ArithmaticExample.addLong(Long.MAX_VALUE, Long.MAX_VALUE));
	}

	public static long addLong(long a,long b){
		return a+b;
	}
	
} `

