+ 3

How to use the import statement I did not understand

5th Jun 2020, 4:03 PM
CrazyKiddo
CrazyKiddo - avatar
4 odpowiedzi
+ 2
It is used to import Java packages. For example: Import java.util.Scanner; Imports the Scanner class.
5th Jun 2020, 4:13 PM
Neba Emmanuel
Neba Emmanuel - avatar
+ 4
Thank you
5th Jun 2020, 4:25 PM
CrazyKiddo
CrazyKiddo - avatar
+ 3
Aviral Anand import is a Java keyword which declares a Java class to use in the code you created in a certain way. Once the Java class is declared, then the class name can be used in the code without specifying the package the class belongs to. If you use the asterisk it declares all classes belong to that particular package.
5th Jun 2020, 4:13 PM
BroFar
BroFar - avatar