+ 1
Hey guys can you explain what does import.java and some confusing stuff like this mean in java or if you guys have got any link
5 Antworten
+ 11
for example U want to use Scanner object for taking user input ,
then u first need to import Scanner class .. ie import java.util.Scanner;
//at the beginning of program
now U can make object of it ... Scanner sc=new Scanner (System.in);
+ 3
Importing is necessary in order to use the classes you wrote yourself or to use the standard Java library.
+ 3
For example, you wrote a class in which there are methods that simplify the syntax of System.out.println and it is located in another package. In my case it is called Print. In order to use it in another package I import it via import. import static MyJava.Print. *
+ 2
thanks man but I am new here you can understand . but the point is I did not understand
+ 1
little more details please