public class AssertExamples
extends java.lang.Object
| Constructor and Description |
|---|
AssertExamples() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
The main method demonstrates calls to maxOf3
and maxOfArray .
|
static int |
maxOf3(int a,
int b,
int c)
Returns the largest of three int values.
|
static int |
maxOfArray(int[] a)
Returns the largest value in an array
|
public static void main(java.lang.String[] args)
args - not used in this implementationpublic static int maxOf3(int a,
int b,
int c)
a - any int valueb - any int valuec - any int valuepublic static int maxOfArray(int[] a)
a - an array of int valuesjava.lang.ArrayIndexOutOfBoundsException - Indicates that a.length <= 0.