What does this ever mean in the block.
if (this == null) {
// some code
}
else {
// ...
}
My concern is will this == null
ever be true? The Java compiler does not show any error.
What does this ever mean in the block.
if (this == null) {
// some code
}
else {
// ...
}
My concern is will this == null
ever be true? The Java compiler does not show any error.
this == null
will never be true. The Java compiler will indeed let you do a few things such as that that have no real purpose, such as if (1==2) {}
or throw null;