operators – Difference between & and && in Java?

  let’s suppose that the startDate is null   if(element.getStartDate()!=null & element.getStartDate().length()>0){ //Treatment1 is not executed a nullPointerException is fired } & ,tests both left and right operand even if the left is false in this example if we use the &&  » wich controle the right and the left operand » we can get a … Lire la suite operators – Difference between & and && in Java?

Évaluez ceci :