New course! Every coder should learn Generative AI!
Try a free lesson+ 1
while(s=bf.readLine()!=nul)l
why it is showing error? String can't be converted to boolean and vice versa
1 Answer
+ 4
I think you might be trying to do a bit too much at once. I believe that assignment statements return a Boolean value. (which is why you need to be careful with the number of equal signs (x=42) will always be true, while (x==42) will respond to your other calculations)
So I'd do the readline() first, then go into the loop, that should fix that right up.