Write a java method clalled kingSum which takes an array of integers as its input and returns the sum of qll its king numbers.
an element is a king number if it's greater than all the elemnts after it. rightmost element is always a king number