---
title: "What is static in java?"  
description: "What is static in java?"  
author: "Sumit Kesarwani"  
published: 2014-08-23  
updated: 2020-09-21  
canonical: https://www.mindstick.com/interview/1981/what-is-static-in-java  
category: "java"  
tags: ["java"]  
reading_time: 2 minutes  

---

# What is static in java?

Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class.Static methods are implicitly final, because overriding is done based on the type of the object, and static methods are attached to a class, not an object.

A static method in a superclass can be shadowed by another static method in a subclass, as long as the original method was not declared final. However, you can't override a static method with a nonstatic method. In other words, you can't change a static method into an instance method in a subclass.

## Answers

### Answer by Sumit Kesarwani

Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class.Static methods are implicitly final, because overriding is done based on the type of the object, and static methods are attached to a class, not an object.

A static method in a superclass can be shadowed by another static method in a subclass, as long as the original method was not declared final. However, you can't override a static method with a nonstatic method. In other words, you can't change a static method into an instance method in a subclass.


---

Original Source: https://www.mindstick.com/interview/1981/what-is-static-in-java

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
