Ola,
Android/JAVA question, I need to test if a object is not NULL and if it’s not NULL check a value, thus avoiding runtime error. As my vb.net background I’m used to;
if (not BackgroundWorker1 = nothing) andalso (backgroundworker.status = running) then
Is there a charming, ‘one IF’/single line way to do this in JAVA?
Thanks!
There’s a pretty direct translation:
Just like VB’s
andalsooperator, Java also uses short-circuit evaluation with its logical operators.