I am unable to understand why following if blocks execute. How the if conditions will be evaluated?
public class Test
{
public static void main(String[] args)
{
if (true || (false || true) && false)
{
System.out.println("How does this condition becomes true.");
}
if (false && (false || true) || true)
{
System.out.println("Same with this condition, why is it true.");
}
}
}
Aucun commentaire:
Enregistrer un commentaire