+ 1

Is it possible take a number of inputs from the user, without mentioning the number of inputs prior to it ??

Java: no of inputs to be entered from user without any prior declaration of number of inputs to be taken..

8th Jul 2019, 1:17 PM
Snehanshu Sen
Snehanshu  Sen - avatar
3 Antworten
8th Jul 2019, 2:02 PM
voja
voja - avatar
+ 2
while loop, and check when there is no input. https://code.sololearn.com/cT81saJV5W9V/?ref=app 1. ArrayList 1.1 import 1.2 add method 2. equals method 3. try catch 4. while loop.
8th Jul 2019, 1:51 PM
Gordon
Gordon - avatar
+ 2
Hey! That's pretty nice man, Thanks @voja
8th Jul 2019, 9:31 PM
Snehanshu Sen
Snehanshu  Sen - avatar