dimanche 30 septembre 2018

Java if boolean

got confused randomly. Could someone explain me about this equation?

if((true) && (false)){}
if(true && false){}

What's the difference? I'm thinking that they are equal?

UPDATE:

Old code version:

if ((followServiceRedirects) && (service != null)) {
  return new ModelAndView(new RedirectView(service));
}

New code version:

if (this.followServiceRedirects && service != null) {
    return new ModelAndView(new RedirectView(service));
}

Are these two equal?

Aucun commentaire:

Enregistrer un commentaire