MAX function

MAX function

Function Name Description Usage Input parameter Return value
MAX Finds the highest value in an array. MAX() N/A Highest value in an array.

Supported data type

The MAX function supports the following data types:

  • Double array
  • Integer array

Example 1: Get the highest value in an integer array

Sample data: $var1$ = {5,8,2,1}

Usage: $var1$.MAX()

Return the highest value in var1.

Output: 8

Example 2: Get the highest value in a double array

Sample data: $var1$ = {2.5,6.1,4.9}

Usage: $var1$.MAX()

Return the highest value in var1.

Output: 6.1

Recommendation

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年12月09日 UTC.