What are imports and why we need them ?

Hello everyone,
Today in this small guide, we will learn about imports.
Whenever we make an extension, we use imports. Without imports, extension cannot be built.

But, What are imports ?
The word import is java keyword. Like we eat food to live, extensions eat imports to build.
Imports depend on the type of extension you are making. Like my ClickZ extension, it needs some listener imports. Every extension needs different imports. Imports fulfill the needs of the extension to compile and work. If a great person wrote a great code without imports and will try to compile it, the build will fail with 1000s of errors. We should also care that extension’s size should not increase because of unnecessary imports. We should only import those which are required.

P.S : Without imports extension cannot be built.
P.S 2 : Imports are the requirements of the extension to build and work.


Some common imports listed below :

  1. import java.awt.*;
  2. import java.awt.event.*;
  3. import javax.swing.*;
  4. import java.util.*;
  5. import java.io.*;
  6. import java.text.*;
  7. import java.util.regex.*;

Hope you found this helpful. :blush:

Is this guide helpful ?
  • Yes
  • No

0 voters

Thanks,
Aquib

2 Likes

Awesome guide @Aquib_Khan …It will help many users!! :smiley:

1 Like

Thank you @Your_UI ! :blush:

2 Likes

Continue this guide you are great

1 Like

Thank you @develop_Studio ! :blush:

1 Like