Meaning of writing an import statement

I am a Java beginner. This time, I will output about the meaning of writing import ~.

Q: What is import?

Translated into Japanese, "bring in", "import", etc. The nuance of bringing something from the outside.

Actually, even in java, the class in the package and interface are used in the working file. Use it when you want to.

How to write an import statement

it's simple. (The photo below is an example) 2019-03-21 22.28のイメージ.jpg

Finally

It seems that the basic principle of programming is that "one class plays one role". So, I think we can have many classes in the process of development. I think the import statement will be used quite a bit. Of course, if you forget to write it where you need it, an error will occur, so don't forget to write it correctly.

The content is thin, but please forgive me. Also, if you have any mistakes or knowledge about java, please let us know in the comments section.

Recommended Posts

Meaning of writing an import statement
Meaning of final
[Meaning of model: of form_with]
Basics of try-with-resources statement
About an instance of java
[Practice! 】 Execution of SQL statement