Input Type

0
0

Hi, I'm using Java and I'm having trouble with the input type. I'm using Scanner(System.in), but I'm keep getting run time error even though I'm not getting this error in my local code editor.

Is this the correct way to get input?

2 answer(s)

0

Thank you so much!

0

Do not new Scanner(System.in) twice.
Use one scanner to read all the input.

write answer 切换为英文 切换为中文


转发分享