<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>if else if stament | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/if-else-if-stament/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Thu, 16 Feb 2023 11:26:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>if…..else if Statement</title>
		<link>https://studentprojects.in/software-development/java/if-else-if-statement/</link>
					<comments>https://studentprojects.in/software-development/java/if-else-if-statement/#respond</comments>
		
		<dc:creator><![CDATA[Shubhajna Rai]]></dc:creator>
		<pubDate>Tue, 28 Feb 2023 11:24:20 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[if else if stament]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=10215</guid>

					<description><![CDATA[<p>The if&#8230;..else if statement is a type of control flow statement that allows for checking multiple expressions and executing the corresponding block of code where the condition evaluates to true. This statement is used when there are more than two blocks of code to be executed, and it is necessary to determine which block to</p>
<p>The post <a href="https://studentprojects.in/software-development/java/if-else-if-statement/">if…..else if Statement</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>The if&#8230;..else if statement is a type of control flow statement that allows for checking multiple expressions and executing the corresponding block of code where the condition evaluates to true. This statement is used when there are more than two blocks of code to be executed, and it is necessary to determine which block to execute based on the result of multiple conditions.</p>



<p>The syntax for an if&#8230;..else if statement can be written as follows:</p>



<pre class="wp-block-code"><code lang="java" class="language-java">if (condition 1) {
    //block of code
} else if (condition 2) {
    //block of code
} else if (condition 3) {
    //block of code
} else if (condition 4) {
    //block of code
} else {
    //if no condition matches
    //block of code
}</code></pre>



<p>Example:</p>



<pre class="wp-block-code"><code lang="java" class="language-java">public class JavaIf {
    public static void main(String[] args) {
        String name[] = {"Mohan", "Rohan", "Soham"};
        int Roll[] = {25, 36, 71};
        if (name[0] == "Mohan" &amp;&amp; Roll[1] == 25) {
            System.out.println("Details of Mohan.");
        } else if (name[2] == "Rohan" &amp;&amp; Roll[1] == 36) {
            System.out.println("Details of Rohan.");
        } else if (name[2] == "Soham" &amp;&amp; Roll[2] == 71) {
            System.out.println("Details of Soham.");
        } else {
            System.out.println("Invalid details.");
        }
    }
}</code></pre>



<p>Output:</p>



<pre class="wp-block-code"><code lang="java" class="language-java">Details of Soham.</code></pre><p>The post <a href="https://studentprojects.in/software-development/java/if-else-if-statement/">if…..else if Statement</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/java/if-else-if-statement/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
