Negative Array Exception occurs when the input size of the array give is a negative number.
This can be handled by a try-catch block.
Further here you have just checked the array's first element to ensure if it is empty and just checked whether the first element is greater than 0 to check if array is invalid.
Instead use
if (arr.length == 0) {
System.out.println("No elements to sum");
break;
}
else if (arr.length < 0) {
System.out.println("Invalid number of elements");
break;
}