aspose file tools*
The moose likes Associate Certification (SCJA,OCAJ 5/6) 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 » Associate Certification (SCJA,OCAJ 5/6)
Bookmark "Can Import create a directory "planets"" Watch "Can Import create a directory "planets"" New topic
Author

Can Import create a directory "planets"

René van der ven
Greenhorn

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
    
    1

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
 
wood burning stoves
 
subject: Can Import create a directory "planets"