<HTML>
<HEAD>
<TITLE>Using an if-else Ladder</TITLE>
</HEAD>
<BODY>
<H1>Using an if-else Ladder</H1>
<%
String day = "Friday";
if(day == "Monday")
out.println("It\'s Monday.");
else if (day == "Tuesday")
out.println("It\'s Tuesday.");
else if (day == "Wednesday")
out.println("It\'s Wednesday.");
else if (day == "Thurssday")
out.println("It\'s Thursday.");
else if (day == "Friday")
out.println("It\'s Friday.");
else if (day == "Saturday")
out.println("It\'s Saturday.");
else if (day == "Sunday")
out.println("It\'s Sunday.");
%>
</BODY>
</HTML>
|