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

and

import static java.lang.System.*;

Recommended Answers

Have you tried asking google?

Jump to Post

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 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.