how to add all the numbers in an array that are less than the last number in the array

I tried this but the error says:

error: bad operand types for binary operator ‘>’
if( numbers > amount){
first type: int[]
second type: int

1 error

exit status 1

class Main{
    public static void main(String[] args) {
        Sum s = new Sum();

        System.out.println( int[]
        System.out.println( int[]{10,9,8,7,6,5,4,3,2,1,-99}));


class Sum{
    public Sum() { // constructor method
        System.out.println("This is the first method called when making an 
instance of a class.");

    public int total(int[] numbers) {
        int sum = 0;
        int last = numbers.length;
        int amount= numbers[last];
        for (int x = 0; x < numbers.length; x++){
              if( numbers > amount){
                sum += numbers[x];
        return sum;