// Altra soluzione per il metodo minimo()
public int minimo() {
  int min = Integer.MAX_VALUE;
  int d;String token;
  StringTokenizer st = new StringTokenizer(dati);
  while (st.hasMoreTokens()) { //sfrutta il fatto che c'e' almeno un dato
    token = st.nextToken();
    d = Integer.parseInt(token);
    if (d < min) min = d;
  }
  return min;
}

// Altra soluzione per il metodo massimo()

public int massimo() {
  int max = Integer.MIN_VALUE;
  int d;
  StringTokenizer st = new StringTokenizer(dati);
  String token;
  while (st.hasMoreTokens()) { //sfrutta il fatto che c'e' almeno un dato
    token = st.nextToken();
    d = Integer.parseInt(token);
    if (d > max) max = d;
  }
  return max;
}
    
