HELP : Math.min.apply(arr); cannot find symbol min

Résolu
CORACOC -  
 CORACOC -
Bonjour,

je ne comprends pas pourquoi ce programme ne fonctionne pas ????
package tableau.random;
import java.util.*;


public class TableauRandom {

  public static void main(String[] args) {
    int totalelem=10,minimum;
    int tableauEntier[] = new int[totalelem];

    for (int i=0 ; i <totalelem ; i++) {
     tableauEntier[i] = (int)(Math.random()*100);
     System.out.print(" "+tableauEntier[i]);
    }

    minimum=Math.min.apply(tableauEntier);
    System.out.println(" ");
    System.out.println("Le nombre minimum compris dans le tableau est : "+minimum);


   }
}

Voici le message d'erreur :

Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: java.lang.Math.min.apply
0 71 21 20 32 81 18 38 20 28 at tableau.random.TableauRandom.main(TableauRandom.java:21)
C:\Users\corac\AppData\Local\NetBeans\Cache\10.0\executor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\corac\AppData\Local\NetBeans\Cache\10.0\executor-snippets\run.xml:68: Java returned: 1
BUILD FAILED (total time: 0 seconds)

et sur le point d'exclamation rouge en marge : cannot find symbol
symbol : variable min
location : class Math

Quelqu'un peut m'aider ?
Merci

EDIT : Ajout des balises de code

Configuration: Windows / Chrome 77.0.3865.90

3 réponses

  1. CORACOC
     
    Ah ok, merci, mais alors je dois faire comment ?
    0
    1. jordane45 Messages postés 30427 Date d'inscription   Statut Modérateur Dernière intervention   4 832
       
      Ben... regarder les liens que je t'ai donné serait déjà un bon debut non ?!
      0
  2. CORACOC
     
    Désolée, je n'avais pas vu les liens, effectivement j'ai trouvé la solution dans le second lien
    Merci beaucoup
    0