---
title: "Discussion on \"static Keyword\" | Hashnode"
description: "Discussion on \"static Keyword\". static variables in java, static methods in java, static block in java, static nested class in java"
url: "https://hashnode.com/posts/static-keyword/60d858b9cb0aa8118c23c896"
---

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

Discussion

# [static Keyword](https://blog.ritvikdubey.com/static-keyword?utm_source=hashnode&utm_medium=feed)

static variables in java, static methods in java, static block in java, static nested class in java

Jun 27, 2021 · 4 min read · blog.ritvikdubey.com  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#codenewbies](https://hashnode.com/tag/codenewbies)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

[Ritvik Dubey](https://hashnode.com/@ritvikdubey27)

@ritvikdubey27 · Indore, India

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

Front End Web Developer

## Responses 1

Markdown supported · ⌘↵ to post

[Srish Codes](https://hashnode.com/@srishcodes)

[Jun 27, 2021](https://hashnode.com/posts/static-keyword/60d858b9cb0aa8118c23c896/comment/60d8b557de92ef110afdf99c)

You could also explain when to declare methods, classes and variables as static and when to not do so 🙂

[Ritvik Dubey](https://hashnode.com/@ritvikdubey27)

[Jul 4, 2021](https://hashnode.com/posts/static-keyword/60d858b9cb0aa8118c23c896/comment/60d8b557de92ef110afdf99c#reply-60e1d04f03707d644a502d17)

Oh sure I'll add it. Thank you so much for your feedback.
