Java Input not working (Beginner)

后端 未结 3 813
夕颜
夕颜 2021-01-22 23:34

For some reason, my code will not accept input on the last line \"What would you like to order: \"

Could anyone tell me what my error is here? It is compiling correctly

3条回答
  •  旧巷少年郎
    2021-01-23 00:06

    Your code has three braces missing. Arraylist have to declared like this

     ArrayList list = new ArrayList();
    

    If you want an arraylist of integers

    ArrayList in = new ArrayList();
    

提交回复
热议问题