J'ai un problème d'exécution

DEMBELEY Messages postés 2 Date d'inscription dimanche 18 octobre 2020 Statut Membre Dernière intervention 20 octobre 2020 - 18 oct. 2020 à 04:26
KX Messages postés 16733 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 31 janvier 2024 - 18 oct. 2020 à 08:41
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at Application.BDD.executionQuery(BDD.java:72)

1 réponse

KX Messages postés 16733 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 31 janvier 2024 127
18 oct. 2020 à 08:41
Bonjour, ← très important, comme le merci

Dans ton code, ligne 72, tu as une valeur null alors que tu l'utilises comme si tu avais une valeur.

Dans la documentation est listé tous les cas où un code peut conduire à une NullPointerException :
https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/lang/NullPointerException.html
  • Calling the instance method of a null object.
  • Accessing or modifying the field of a null object.
  • Taking the length of null as if it were an array.
  • Accessing or modifying the slots of null as if it were an array.
  • Throwing null as if it were a Throwable value.
1
Rejoignez-nous