Advertisement
vladimirVenkov

What is “import” in Java?

Oct 24th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1.  What is “import” in Java?
  2.  
  3. it's a declaration, not a statement
  4.  
  5. import is a keyword. import keyword is used to import built-in and user-defined packages into your java source file so that your class can refer to a class that is in another package by directly using its name.
  6.  
  7. Use the '*' character to declare all the classes belonging to the package.
  8.  
  9. https://www.quora.com/Why-we-use-import-in-Java
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement