---
title: "What are static method? and how to use them?"  
description: "What are static method? and how to use them?"  
author: "Paul Wilson"  
published: 2017-11-13  
updated: 2018-07-16  
canonical: https://answers.mindstick.com/qa/30450/what-are-static-method-and-how-to-use-them  
category: "programming"  
tags: ["computers", "software", "functions", "programming"]  
reading_time: 1 minute  

---

# What are static method? and how to use them?

What are [static method](https://www.mindstick.com/blog/440/creating-static-methods-in-c-sharp)? and how to use them?

## Answers

### Answer by Arti Mishra

**Static Method:** Static methods are those methods that are **defined using static keyword**. If you define any method as static you **don’t need to create an object** of that particular method. And a **static method call directly by using the class name.****\****How to use static method :** class_name.static_method_name();\
**Example –**class Student{ int rollno; String name; static void dispaly(){ System.out.println(“Static block Call”); } Student(int r, String n){ rollno = r; name = n; } void displayData(){System.out.println(rollno+" "+name);}\
public static void main(String args[]){ Student.display(); Student s1 = new Student9 (111,"Arti"); Student s2 = new Student9 (222,"Harsh"); Student s3 = new Student9 (333,"Aditya"); Student s4 = new Student9 (333,"Vishal"); s1.display(); s2.display(); s3.display(); s4.display(); }}\


---

Original Source: https://answers.mindstick.com/qa/30450/what-are-static-method-and-how-to-use-them

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
