Obtenir le maximum d’un tableau

Author:


{filelink=12322}

if (v.size() == 0) throw new NoSuchElementException();
T plusGrand = v.get(0);
for (int i = 1; i < v.size(); i++)
   if (plusGrand.compareTo(v.get(i)) < 0)
      largest = v.get(i);

Leave a Reply

Your email address will not be published. Required fields are marked *