File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Junior/Associate Certification (SCJA,OCAJ 5/6/8) and the fly likes Can Import create a directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Junior/Associate Certification (SCJA,OCAJ 5/6/8)
Bookmark "Can Import create a directory "planets"" Watch "Can Import create a directory "planets"" New topic

Can Import create a directory "planets"

René van der ven

Joined: Oct 25, 2009
Posts: 8

package com.scjaexam.tutorial;

- This statements creates the directories: com\scjaexam\tutorial

However a directory planets is created as well

import com.scjaexam.tutorial.planets.*;

-Is it true that the line above creates the directory planets?

Thanks in advance for your reply.

All the code
package com.scjaexam.tutorial;
import com.scjaexam.tutorial.planets.*;

public class GreetingsUniverse {

public static void main(String[] args) {
System.out.println("Greetings, Universe!");

Earth e = new Earth();
Mars m = new Mars();
Venus v = new Venus();

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

No, the simple import won't create a directory for you, however, some GUI tools will.

The import name is simply a reference to a folder structure. So, when a class is in a given 'package', that class must be in a folder structure that is the same as the package. You'd have to create the folder structure manually.

-Cameron McKenzie
I agree. Here's the link:
subject: Can Import create a directory "planets"
It's not a secret anymore!