I encountered a statement in Java
while ((line = reader.readLine()) != null) {
out.append(line);
}
How do assignment operations return a value in Java?
The statement we are checking is line = reader.readLine()
and we compare it with null
.
Since readLine
will return a string, how exactly are we checking for null
?