I think that now it is basically just a convention, but I would say that it helps organize things down abit.
Here are some examples of why I say this: com.vzy.gui.* And com.vzy.io.*
- passing through them, we see
com and think: "Oh, uh, this is the company that made it" - then
vzy and think: "The people who did it, vzy!" - then
gui and io , which leads us to the fact that "this works with the GUI, and this other one works with IO, cool."
I think another good way to show this is to bring it back and see how it will look ...
import ArrayList.util.java import BorderLayout.awt.java import File.io.java import JButton.swing.javax import JFrame.swing.javax import JLabel.swing.javax import JOptionPane.swing.javax import JPanel.swing.javax import JScrollPane.swing.javax import JSlider.swing.javax import LinkedBlockingQueue.concurrent.util.java import PrintWriter.io.java import Scanner.util.java import SwingUtilities.swing.javax
or
import java.awt.BorderLayout import java.io.File import java.io.PrintWriter import java.util.ArrayList import java.util.Scanner import java.util.concurrent.LinkedBlockingQueue import javax.swing.JButton import javax.swing.JFrame import javax.swing.JLabel import javax.swing.JOptionPane import javax.swing.JPanel import javax.swing.JScrollPane import javax.swing.JSlider import javax.swing.SwingUtilities
source share