---
title: "What is static import ?"  
description: "What is static import ?"  
author: "Anonymous User"  
published: 2015-04-22  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/2423/what-is-static-import  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is static import ?

The static import feature of Java 5 facilitate the java programmer to access any static member of a class directly. There is no need to qualify it by the class name.

```
import static java.lang.System.*;    class StaticImportExample{    public static void main(String args[]){          out.println("Hello");//Now no need of System.out     out.println("Java");     }   }  
```

## Answers

### Answer by Anonymous User

The static import feature of Java 5 facilitate the java programmer to access any static member of a class directly. There is no need to qualify it by the class name.

```
import static java.lang.System.*;    class StaticImportExample{    public static void main(String args[]){          out.println("Hello");//Now no need of System.out     out.println("Java");     }   }  
```


---

Original Source: https://www.mindstick.com/interview/2423/what-is-static-import

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
