What is the difference between
import static java.lang.System;

and

import static java.lang.System.*;

Recommended Answers

All 3 Replies

Have you tried asking google?

In short words.....
import static java.lang.System; - It means u are just trying to import the namespace System

import static java.lang.System.*; - It means u are trying to import all the namespaces that comes under System....no need to import the namespaces that comes under System again....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.