I have that method `valorMaxim([1, 5, 252, 24, 7, 82, 3])` returns 252.
I don't know how to do it. I have been thinking if I could decrease the array length.

```java
public static int valorMaxim(int arr[]){
    int max;

    if(arr.length==1)
        return arr[0];
    for (int i = 0; i < arr.length; i++) {
        if (arr[i] < arr[i+1]) {
            max=arr[i+1];
            return arr[i+1];
        }
    }
    return valorMaxim(arr);

    //Retorna el valor màxim en un array no buit d’enters.
}

```