Example of Nested Ifs
if (coin == HEADS)
if (choice == RECEIVE)
System.out.println(“You won, will receive”);
else
System.out.println(“You won, will kickoff”);
else
System.out.println(“You lost.”);
Previous slide
Next slide
Back to first slide
View graphic version