while (start){
name = input.nextLine();
if(name.isEmpty()){
start = false;
break;
}
names.add(name);
}```
My IDE (IDEA) underlines the (start) condition in the while loop, with Condition is always true (which it is not) why is that?
#Very basic question about my IDE
1 messages · Page 1 of 1 (latest)
Detected code, here are some useful tools:
[WARNING] The code couldn't end properly...
Problematic source code:
while (start){
name = input.nextLine();
if(name.isEmpty()){
start = false;
break;
}
names.add(name);
}```
Cause:
The code doesn't compile:
cannot find symbol
symbol: variable start
location: class
cannot find symbol
symbol: variable name
location: class
cannot find symbol
symbol: variable input
location: class
cannot find symbol
symbol: variable name
location: class
cannot find symbol
symbol: variable start
location: class
cannot find symbol
symbol: variable name
location: class
cannot find symbol
symbol: variable names
location: class
## System out
[Nothing]
<@&987246527741304832> please have a look, thanks.
because your break after changing start will already cause your loop to exit
Thanks thats way better