I am using the Long primitive type which increments by 1 whenever my 'generateNumber'method called. What happens if Long reaches to his maximum limit? will throw any exception or will reset to minimum value? here is my sample code:
class LongTest {
private static long increment;
public static long generateNumber(){
++increment;
return increment;
}
}