---
title: "Discussion on \"Pattern matching comes to Switches in Java\" | Hashnode"
description: "Discussion on \"Pattern matching comes to Switches in Java\". Switches in Java lacked an option to match a value based on an expression that is computed at runtime(similar to C). So the values against which a value can be matched should be constant known at compile time.\nBelow is the current format of switch th..."
url: "https://hashnode.com/posts/pattern-matching-comes-to-switches-in-java/61a65e09be456923c52ba891"
---

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

Discussion

# [Pattern matching comes to Switches in Java](https://blog.commitbyte.com/pattern-matching-comes-to-switches-in-java?utm_source=hashnode&utm_medium=feed)

Switches in Java lacked an option to match a value based on an expression that is computed at runtime(similar to C). So the values against which a value can be matched should be constant known at compile time. Below is the current format of switch th...

Nov 30, 2021 · 3 min read · blog.commitbyte.com  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#features](https://hashnode.com/tag/features)

## Written by

[Santhosh Manikandan Soundararajan](https://hashnode.com/@santhoshmanikandan)

@santhoshmanikandan · Chennai, India

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

Java/Shell Script developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
