0
What is the meaning of import java.util.System.*;
System is a class , So what denotes .* over there?
6 Respostas
+ 3
java.util.system.* is used to import all the java language utilites to use it in a program.without that import all the variables wont work in the program
+ 2
I think what you mean is static import.
E.g.
import static java.lang.System.err;
import static java.lang.System.out;
So we use * to import all static fields
import static java.lang.System.*;
Then we can call println without System.
E.g.
out.println("Hello");
err.println("error");
+ 1
import statement in a java is used in Java to import all the predefined classes defined in a package package is just like a directory in the file system and scanner is a java class that provides the ability to take input from the user and In Java ,classes are organised in a package to understand and visualise them as a directories
0
in other words it is a header file used for importing predefined behaviours from jvm library
- 1
java.util.System.*; this * means system class all members and members are included in your program
- 1
not util lang package is system class