1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-09-01 21:32:35 +02:00

Add conditionals in Java (#1731)

* Update 102-conditionals.md

I've added content in the roadmap documentation to study conditionals in Java.

* Update content/roadmaps/110-java/content/100-java-fundamentals/102-conditionals.md

Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
This commit is contained in:
Kartikey Verma
2022-09-12 16:46:27 +05:30
committed by GitHub
parent 43794c8d0f
commit 9ff95409a9

View File

@@ -1 +1,13 @@
# Conditionals
# Conditionals
Java has the following conditional statements:
* Use `if` to specify a block of code to be executed, if a specified condition is true
* Use `else` to specify a block of code to be executed if the same condition is false
* Use `else if` to specify a new condition to test; if the first condition is false
* Use `switch` to specify many alternative blocks of code to be executed
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.educative.io/answers/what-are-conditional-statements-in-programming'>What are Conditional statements?</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.javatpoint.com/java-if-else'>Conditionals in Java</BadgeLink>
<BadgeLink badgeText='Watch' href='https://www.youtube.com/watch?v=YPK6NYMJt_A'>Conditionals in Java</BadgeLink>