Recursive characterization of the operation of finding the maximum among a set of values read from a file that contains positive integers:

- if the file is finished, return 0;
- otherwise,
- read an integer
*i*from the file; - find the maximum
*m*among the remaining values in the file; - return the bigger one between
*i*and*m*.

- read an integer

Implementation: we access the file through a `BufferedReader`, and we
assume that each integer is written on a separate line.

public static int maximum(BufferedReader br) throws IOException { String s = br.readLine(); if (s == null) return 0; else { int i = Integer.parseInt(s); int m = maximum(br); return (m > i)? m : i; } }