Illegal argument exception: n must be positive

后端 未结 3 2004
南方客
南方客 2020-12-21 17:27

main class:

public class ECONAPP2 {
static Scanner input= new Scanner(System.in);
static int score = 0;
static ArrayList used         


        
3条回答
  •  情书的邮戳
    2020-12-21 18:14

    You want to change the order you're calling methods in you main method. Try this:

    public static void main(String[] args){
        arrayContents();
        app();
    }
    

    This way when you call app(), your ArrayList has items in it.

提交回复
热议问题