java.lang.IllegalArgumentException: n <= 0: -10

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Oracle Community by 807600, 3 months ago
n must be posit ive
via JIRA by Nidhi Mehta, 1 year ago
n must be positive
via JIRA by Nidhi Mehta, 1 year ago
n must be positive
java.lang.IllegalArgumentException: n <= 0: -10
at java.util.Random.nextInt(Random.java:182)
at com.dunomade.ecraseurdetaupe.PlacementPerso.aPlacer(PlacementPerso.java:27)
at com.dunomade.ecraseurdetaupe.GenerateurPartie$1$1.run(GenerateurPartie.java:56)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)

Users with the same issue

3 times, 5 months ago
31 times, 10 months ago
60 times, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 5 months ago
12 times, 1 year ago
4 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.