posted 20 years ago
The package line says that your PostServlet class is in the com.javaranch package, which means it is in the subdirectory com/javaranch relative to your source root directory.
If you have the import java.io.* line, you are indicating that your class can use the java.io package classes without fully qualifying their names. If you notice, your class can use a PrintWriter without having to call it java.io.PrintWriter each time you use the PrintWriter name.
When you declare a package, you are not calling the package. When you import the set of classes in a package (e.g., import java.io.*), you are also not making a call.