---
title: "Discussion on \"Var in JAVA? Are you kidding?\" | Hashnode"
description: "Discussion on \"Var in JAVA? Are you kidding?\". What would be your reaction if I tell you, you can use the Var keyword (not technically) (answer at the bottom ) to declare a variable in JAVA, just like JavaScript. How would you react? \nHappy? Sad?  I don't know whether you will be happy or sad, bu..."
url: "https://hashnode.com/posts/var-in-java/6140d4c84e51f6028be01d43"
---

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

Discussion

# [Var in JAVA? Are you kidding?](https://pratiknayak.hashnode.dev/var-in-java?utm_source=hashnode&utm_medium=feed)

What would be your reaction if I tell you, you can use the Var keyword (not technically) (answer at the bottom ) to declare a variable in JAVA, just like JavaScript. How would you react? Happy? Sad? I don't know whether you will be happy or sad, bu...

Sep 14, 2021 · 4 min read · pratiknayak.hashnode.dev  
Read the article

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

## Written by

[Pratik Nayak](https://hashnode.com/@PratikNayak)

@PratikNayak · Bengaluru,Karnataka

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

" Bleed during practice so that you don't have to bleed during war "

## Responses 3

Markdown supported · ⌘↵ to post

[Osman Recai Ödemis](https://hashnode.com/@ooedemis)

[Sep 24, 2021](https://hashnode.com/posts/var-in-java/6140d4c84e51f6028be01d43/comment/614e613294bb297e1aad5dec)

great article the only purpose is avoiding boilerplate :)

[Pratik Nayak](https://hashnode.com/@PratikNayak)

[Sep 26, 2021](https://hashnode.com/posts/var-in-java/6140d4c84e51f6028be01d43/comment/614e613294bb297e1aad5dec#reply-6150c7dd94bb297e1aad8b92)

Hey...thank you and yes it is used to avoid boilerplate code.

[Mausam Singh](https://hashnode.com/@mausamsingh470)

[Sep 15, 2021](https://hashnode.com/posts/var-in-java/6140d4c84e51f6028be01d43/comment/6141785bc5f31102b885e186)

This is useful and informative at same time. Congrats for writing your first blog, I am looking forward to read your blog. #KeepCoding

[Pratik Nayak](https://hashnode.com/@PratikNayak)

[Sep 15, 2021](https://hashnode.com/posts/var-in-java/6140d4c84e51f6028be01d43/comment/6141785bc5f31102b885e186#reply-61418897c5f31102b885e356)

Thanks Mausam, means a lot!

[Maddy](https://hashnode.com/@Maddy25)

[Sep 14, 2021](https://hashnode.com/posts/var-in-java/6140d4c84e51f6028be01d43/comment/6141129ac5f31102b885d793)

Your first article is great! Well done. 👏🏾👏🏾👏🏾

I was also surprised when I found out about **var** in Java! 😆 It's actually quite cool. I think they're introducing many features that reduce Java's verbosity.

[Pratik Nayak](https://hashnode.com/@PratikNayak)

[Sep 15, 2021](https://hashnode.com/posts/var-in-java/6140d4c84e51f6028be01d43/comment/6141129ac5f31102b885d793#reply-614163254e51f6028be02a31)

Hey..thanks 😊 . Yes , they are trying to modernise the evergreen Java .
