<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Java%2FC2%2FSwitch-Case%2FEnglish</id>
		<title>Java/C2/Switch-Case/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Java%2FC2%2FSwitch-Case%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Java/C2/Switch-Case/English&amp;action=history"/>
		<updated>2026-05-24T12:41:26Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Java/C2/Switch-Case/English&amp;diff=4190&amp;oldid=prev</id>
		<title>Sneha at 04:46, 9 May 2013</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Java/C2/Switch-Case/English&amp;diff=4190&amp;oldid=prev"/>
				<updated>2013-05-09T04:46:23Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://script.spoken-tutorial.org/index.php?title=Java/C2/Switch-Case/English&amp;amp;diff=4190&amp;amp;oldid=4185&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Sneha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Java/C2/Switch-Case/English&amp;diff=4185&amp;oldid=prev</id>
		<title>Sneha at 03:55, 9 May 2013</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Java/C2/Switch-Case/English&amp;diff=4185&amp;oldid=prev"/>
				<updated>2013-05-09T03:55:31Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 03:55, 9 May 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 29:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 29:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''Ubuntu 11.10'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''Ubuntu &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v &lt;/ins&gt;11.10'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''JDK 1.6''' and &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''JDK 1.6''' and &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''Eclipse 3.7.0'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''Eclipse 3.7.0'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If not, please go through the tutorials on these topics available at our website [http://spoken-tuitorial.org/ http][http://spoken-tuitorial.org/ ://][http://spoken-tuitorial.org/ spoken][http://spoken-tuitorial.org/ -][http://spoken-tuitorial.org/ tutorial][http://spoken-tuitorial.org/ .][http://spoken-tuitorial.org/ org]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If not, please go through the tutorials on these topics available at our website &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;which is as shown &lt;/ins&gt;[http://spoken-tuitorial.org/ http][http://spoken-tuitorial.org/ ://][http://spoken-tuitorial.org/ spoken][http://spoken-tuitorial.org/ -][http://spoken-tuitorial.org/ tutorial][http://spoken-tuitorial.org/ .][http://spoken-tuitorial.org/ org]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''switch case'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''switch case'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The &lt;/del&gt;switch case is used to perform actions based on the value of a variable.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;A &lt;/ins&gt;switch case is used to perform actions based on the value of a variable.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Let us add some variables.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Now &lt;/ins&gt;Let us add some variables.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Highlight day and dName when you explain.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Highlight day and dName when you explain.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Inside the main, we will create a '''variable day''' of type '''int'''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Inside the main &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;method&lt;/ins&gt;, we will create a '''variable day''' of type '''int'''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;So type''' int day '''and we can give it a value '''equal to''' '''3'''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;So type &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;inside the main&amp;#160; method&lt;/ins&gt;''' int day '''and we can give it a value '''equal to''' '''3''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;semi-colon&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, let us create a '''variable dName''' of type '''String.'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, let us create a '''variable dName''' of type '''String.'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;String dane we shall initialize&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Then initialize it to null.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Then initialize it to null.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sneha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Java/C2/Switch-Case/English&amp;diff=1238&amp;oldid=prev</id>
		<title>Arya: Created page with ''''Title of script''': Switch Case in Java  '''Author''': TalentSprint  '''Keywords: '''case, switch, conditions, video tutorial    {| style=&quot;border-spacing:0;&quot; | style=&quot;border:0…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Java/C2/Switch-Case/English&amp;diff=1238&amp;oldid=prev"/>
				<updated>2012-12-07T11:23:55Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;#039;&amp;#039;&amp;#039;Title of script&amp;#039;&amp;#039;&amp;#039;: Switch Case in Java  &amp;#039;&amp;#039;&amp;#039;Author&amp;#039;&amp;#039;&amp;#039;: TalentSprint  &amp;#039;&amp;#039;&amp;#039;Keywords: &amp;#039;&amp;#039;&amp;#039;case, switch, conditions, video tutorial    {| style=&amp;quot;border-spacing:0;&amp;quot; | style=&amp;quot;border:0…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Title of script''': Switch Case in Java&lt;br /&gt;
&lt;br /&gt;
'''Author''': TalentSprint&lt;br /&gt;
&lt;br /&gt;
'''Keywords: '''case, switch, conditions, video tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| '''Visual Cue '''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| '''Description'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
&lt;br /&gt;
'''Welcome'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Welcome to the spoken tutorial on '''Switch case in Java'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
&lt;br /&gt;
'''Learning Outcomes'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| In this tutorial, you will learn how to use the '''switch case construct in Java'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
&lt;br /&gt;
'''Tools Used'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| For this tutorial we are using &lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu 11.10'''&lt;br /&gt;
* '''JDK 1.6''' and &lt;br /&gt;
* '''Eclipse 3.7.0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| For this tutorial, you should have knowledge of if else statement in Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, please go through the tutorials on these topics available at our website [http://spoken-tuitorial.org/ http][http://spoken-tuitorial.org/ ://][http://spoken-tuitorial.org/ spoken][http://spoken-tuitorial.org/ -][http://spoken-tuitorial.org/ tutorial][http://spoken-tuitorial.org/ .][http://spoken-tuitorial.org/ org]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 5&lt;br /&gt;
&lt;br /&gt;
'''switch case'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| The switch case is used to perform actions based on the value of a variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the syntax for a '''switch case statement'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us use it now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Minimize Slides and open Eclipse&lt;br /&gt;
&lt;br /&gt;
Eclipse should contain the following code&lt;br /&gt;
&lt;br /&gt;
'''public class SwitchCaseDemo{'''&lt;br /&gt;
&lt;br /&gt;
'''public static void main(String&amp;lt;nowiki&amp;gt;[] &amp;lt;/nowiki&amp;gt;args){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| I already have '''Eclipse''' opened.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have created a '''class''' named '''SwitchCaseDemo.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us add some variables.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Inside the main, type&lt;br /&gt;
&lt;br /&gt;
'''int day = 3;'''&lt;br /&gt;
&lt;br /&gt;
'''String dName = “”&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight day and dName when you explain.&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Inside the main, we will create a '''variable day''' of type '''int'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type''' int day '''and we can give it a value '''equal to''' '''3'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us create a '''variable dName''' of type '''String.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then initialize it to null.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here '''dName '''is a '''variable '''to hold the names of the days of a week.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''day''' stores the '''day number'''.&lt;br /&gt;
&lt;br /&gt;
Now, we will type the '''switch case statement.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So type '''switch '''within brackets''' day , '''then open curly brackets... &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| Highlight '''switch(day)'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| This statement defines which variable is under consideration for the cases.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| Type &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''switch(day) {'''&lt;br /&gt;
&lt;br /&gt;
'''case 0:'''&lt;br /&gt;
&lt;br /&gt;
'''dName = “Sunday”;'''&lt;br /&gt;
&lt;br /&gt;
'''break&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| Next line '''type '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''case 0 '''''colon''&lt;br /&gt;
&lt;br /&gt;
'''dName '''''equal to within double quotes''''' Sunday '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
Then type '''break '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This statement says that if the value of day is 0, the value of '''dName''' must be set to '''Sunday.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that a '''break''' statement must be used at the end of each case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
without the break statement, the switch-case functions in a complex fashion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It will be explained in subsequent part of the tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| '''switch(day) {'''&lt;br /&gt;
&lt;br /&gt;
'''case 0:'''&lt;br /&gt;
&lt;br /&gt;
'''dName = “Sunday”;'''&lt;br /&gt;
&lt;br /&gt;
'''break&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''case 1:'''&lt;br /&gt;
&lt;br /&gt;
'''dName = “Monday”;'''&lt;br /&gt;
&lt;br /&gt;
'''break&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''case 2:'''&lt;br /&gt;
&lt;br /&gt;
'''dName = “Tuesday”;'''&lt;br /&gt;
&lt;br /&gt;
'''break&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''case 3:'''&lt;br /&gt;
&lt;br /&gt;
'''dName = “Wednesday”;'''&lt;br /&gt;
&lt;br /&gt;
'''break&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''case 4:'''&lt;br /&gt;
&lt;br /&gt;
'''dName = “Thursday”;'''&lt;br /&gt;
&lt;br /&gt;
'''break&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''case 5:'''&lt;br /&gt;
&lt;br /&gt;
'''dName = “Friday”;'''&lt;br /&gt;
&lt;br /&gt;
'''break&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''case 6:'''&lt;br /&gt;
&lt;br /&gt;
'''dName = “Saturday”;'''&lt;br /&gt;
&lt;br /&gt;
'''break&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| Similarly, let us type the remaining cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''case 1 '''''colon''&lt;br /&gt;
&lt;br /&gt;
'''dName '''''equal to within double quotes''''' Monday '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''break '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''case 2 '''''colon''&lt;br /&gt;
&lt;br /&gt;
'''dName '''''equal to within double quotes''''' Tuesday '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''break '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''case 3 '''''colon''&lt;br /&gt;
&lt;br /&gt;
'''dName '''''equal to within double quotes''''' Wednesday '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''break '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''case 4 '''''colon''&lt;br /&gt;
&lt;br /&gt;
'''dName '''''equal to within double quotes''''' Thursday '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''break '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''case 5 '''''colon''&lt;br /&gt;
&lt;br /&gt;
'''dName '''''equal to within double quotes''''' Friday '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''break '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''case 5 '''''colon''&lt;br /&gt;
&lt;br /&gt;
'''dName '''''equal to within double quotes''''' Saturday '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
'''break '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
Then close the brackets.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Let us now add a print statement and see the code in action.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Type '''System.out.println(dName);'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''save''' and '''run'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to output&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Type '''System '''''dot '''''out '''''dot '''''println '''''within brackets '''''dName '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Save''' and run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the output is '''Wednesday''' corresponding to the case '''3.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us change the value of day and see the result&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Change '''day = 3''' to '''day = 0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''save''' and''' run'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to output&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Change '''3''' to '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and Run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the output is '''Sunday''' corresponding to the case '''0'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now what if there is no case corresponding to the value. Let us see&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Change '''day = 0''' to '''day = -1'''&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| As we can see, there is no output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But it would be better if we could have a case for all other values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That is done by using the '''default''' keyword.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| After the last case, type this&lt;br /&gt;
&lt;br /&gt;
'''default:'''&lt;br /&gt;
&lt;br /&gt;
'''dName = “Wrong Choice”'''&lt;br /&gt;
&lt;br /&gt;
'''break&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''save''' and '''run'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to output&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| After the last case, type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''default '''''colon''&lt;br /&gt;
&lt;br /&gt;
'''dName '''''equal to within double quotes '''''Wrong Choice'''&lt;br /&gt;
&lt;br /&gt;
'''break '''''semicolon''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that we simply use the keyword '''default''' .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We do not say '''case default.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now run the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, the default case is executed and the required message is printed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us try with another random value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Change '''day = -1''' to '''day = 15'''&lt;br /&gt;
&lt;br /&gt;
save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Change '''-1''' to '''15'''&lt;br /&gt;
&lt;br /&gt;
As we can see, again the default case is executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| Now let us see what happens if we remove the break statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Change '''day = 15''' to '''day = 4'''&lt;br /&gt;
&lt;br /&gt;
Remove the '''break in case 4''' statement there&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Let us change '''day = 15''' to '''day = 4'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And remove the corresponding break statement for '''day&amp;lt;nowiki&amp;gt;=4&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save and run&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| '''Point to output'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| Although the case is 4, we get the output as''' Friday''' and not '''Thursday.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| '''Highlight case 4 and case 5'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| This is because of the way switch case works. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First the value of day is compared with 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then with 1 and then with 2 and so on with all the possible cases.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.176cm;&amp;quot;| When a match is found, it executes all the case from the match onwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our case, it executed case 5 after case 4 .&lt;br /&gt;
&lt;br /&gt;
Then it stops because of the break statement in case 5.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To avoid that, we need to add a '''break''' statement in each case.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Type in case 4&lt;br /&gt;
&lt;br /&gt;
'''break&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Let us now add the break statement we removed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Type break '''''semicolon.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us run the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Save and run. Point to output&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| As we can see, now only '''case 4''' is executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a rule, remember to use a '''break''' statement in every case to avoid errors.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Minimize the '''Eclipse''' window and switch to slides.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Slide 6&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| We have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
In this tutorial we have learnt how to '''use switch case construct''' and '''how to use break statement.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 7'''Assignment'''&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Write a program that has a name and gender and a switch case statement that prints “Hello Mr....” for males and “Hello Ms...” for females.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 8'''About the Spoken Tutorial Project'''&lt;br /&gt;
&lt;br /&gt;
* Watch the video available at[http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  ][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial ://][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial -][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial .][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial org][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial /][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial What][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial is][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial a][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Spoken][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial _][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial Tutorial]&lt;br /&gt;
&lt;br /&gt;
* It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
* If you do not have good bandwidth, you can download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| To know more about the '''Spoken Tutorial''' project, watch the video available at the following link, that summarises the project.Alternatively, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 9'''Spoken Tutorial Workshops'''The Spoken Tutorial Project Team&lt;br /&gt;
&lt;br /&gt;
* Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
* Gives certificates for those who pass an online test&lt;br /&gt;
&lt;br /&gt;
* For more details, please write to [mailto:contact@spoken-tutorial.org contact][mailto:contact@spoken-tutorial.org @][mailto:contact@spoken-tutorial.org spoken][mailto:contact@spoken-tutorial.org -][mailto:contact@spoken-tutorial.org tutorial][mailto:contact@spoken-tutorial.org .][mailto:contact@spoken-tutorial.org org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| The Spoken Tutorial Project Team. Conducts workshops using '''spoken tutorials''' and gives certificates for those who pass an online test. For more details, please write to '''contact AT spoken HYPHEN tutorial DOT org.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 10'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
* Spoken Tutorial Project is a part of the Talk to a Teacher project&lt;br /&gt;
&lt;br /&gt;
* It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
* More information on this Mission is available at&lt;br /&gt;
&lt;br /&gt;
* [http://spoken-tutorial.org/NMEICT-Intro http][http://spoken-tutorial.org/NMEICT-Intro ://][http://spoken-tutorial.org/NMEICT-Intro spoken][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro tutorial][http://spoken-tutorial.org/NMEICT-Intro .][http://spoken-tutorial.org/NMEICT-Intro org][http://spoken-tutorial.org/NMEICT-Intro /][http://spoken-tutorial.org/NMEICT-Intro NMEICT][http://spoken-tutorial.org/NMEICT-Intro -][http://spoken-tutorial.org/NMEICT-Intro Intro]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| '''Spoken Tutorial '''Project is a part of the '''Talk to a Teacher''' project and is supported by the '''National Mission on Education through ICT, MHRD, Government of India. '''More information on this Mission is available at '''spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| Slide 11'''About the contributor'''&lt;br /&gt;
&lt;br /&gt;
* This tutorial has been contributed by '''TalentSprint'''&lt;br /&gt;
* '''www.talentsprint.com'''&lt;br /&gt;
&lt;br /&gt;
* Thanks for joining&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:0.035cm solid #000000;padding:0.097cm;&amp;quot;| This tutorial has been contributed by '''TalentSprint'''. Thanks for joining.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Arya</name></author>	</entry>

	</feed>