why here i can't use for loop instead of while.
while(true){
int a = Integer.parseInt(reader.readLine());
list.add(a);
}
could anyone clear my doubt...
Under discussion
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
null
7 July 2020, 16:51
for-loop and while-loop are the same. It all depends on how you set up the condition.
0
Thomas
7 July 2020, 11:11
won't that verify?
0