in the File class. I know what the mkdir() does. And what is the mkdirs() for? The book i study on doesn't have mkdirs() so.. i am not sure thanks.
Joined: Jul 18, 2001
The mkdir method will create the current directory(if it is possible). The mkdirs method will create all necessary relative directory. Example, if the pathname is "c:\temp\test\mydir\", if we use mkdirs(), and the dir temp, test and mydir don't exist, they will all be created. If we use mkdir(), the directory mydir will be created only when temp, test are existing. Correct me if I am wrong, hope it helps.
------------------ Guoqiao Sun Sun Certified Programmer for Java 2 Platform try my mock exam¹²³ at my homepage.
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Joined: Aug 01, 2001
As the Java API documentation says, "Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories." For questions of this type, I think it's easier and quicker to look first at the Java API documentation, don't you think? I don't mean to be rude, I only want to point you how you can find a quicker solution. Radu Zaharia