---
title: "Discussion on \"Java Conditional statements\" | Hashnode"
description: "Discussion on \"Java Conditional statements\". Java has the following conditional statements:\n\nUse if to specify a block of code to be executed if a specified condition is true.\n\nUse else to specify a block of code to be executed, if the same condition is false.\n\nUse else if to specify a new cond..."
url: "https://hashnode.com/posts/java-conditional-statements/651d5d3e0d236e2056e6d7d7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Java Conditional statements](https://namangargjava-dsa.hashnode.dev/java-conditional-statements?utm_source=hashnode&utm_medium=feed)

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 cond...

Oct 1, 2023 · 4 min read · namangargjava-dsa.hashnode.dev  
Read the article

-   [#dsainjava](https://hashnode.com/tag/dsainjava)
-   [#dsa-course](https://hashnode.com/tag/dsa-course)
-   [#dsa-series](https://hashnode.com/tag/dsa-series)
-   [#java](https://hashnode.com/tag/java)

## Written by

[Naman Garg](https://hashnode.com/@namangarg3311)

@namangarg3311 · India

  
[View profile](https://hashnode.com/@namangarg3311)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
