Java Program – to sum all the elements in an array(user inputs).

Output: