String a;
a = "123";
if(a == null) { Output string null }
I did it like this I put the string "123" in the string.
If I check the null in the next line, it says null, is there something wrong?
Can't I null-check a string like this in Java?
Thank you^
^ android
Something must have gone wrong. Look at the results below.
jshell> String a;
a ==> null
jshell> a = "123";
a ==> "123"
jshell> a == null
$3 ==> false
© 2024 OneMinuteCode. All rights reserved.