jimphei學習工作室
jimphei學習工作室
BlogJava
::
首頁
::
新隨筆
::
聯系
::
聚合
::
管理
::
23 隨筆 :: 0 文章 :: 1 評論 :: 0 Trackbacks
<
2009年3月
>
日
一
二
三
四
五
六
22
23
24
25
26
27
28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
常用鏈接
我的隨筆
我的評論
我的參與
最新評論
留言簿
(2)
給我留言
查看公開留言
查看私人留言
隨筆檔案
2009年11月 (7)
2009年9月 (3)
2009年8月 (3)
2009年6月 (3)
2009年5月 (1)
2009年3月 (4)
2008年11月 (2)
搜索
最新評論
1.?re: 電子商務系統的一些代碼[未登錄]
頁面上邏輯不能封裝到bean里頭?
--sclsch
閱讀排行榜
1.?java獲得指定時間幾天前或幾天后的日期(1288)
2.?spring結合velocity的應用實例(1149)
3.?Struts2+JQuery+JSON集成(829)
4.?velocity的默認加載路徑修改(548)
5.?安裝Apache+PHP在Windows+IIS下(346)
評論排行榜
1.?電子商務系統的一些代碼(1)
2.?偶數樣式(0)
3.?null(0)
4.?spring結合velocity的應用實例(0)
5.?關于表達式中的#、%、$(0)
遞歸的文件目錄遍歷
public
static
void
main(String[] args)
{
//
TODO 自動生成方法存根
File f
=
new
File(
"
e:/jimphei
"
);
tree(f,
0
);
}
public
static
void
tree(File f,
int
level)
{
String strlen
=
""
;
for
(
int
i
=
0
;i
<
level;i
++
)
{
strlen
+=
"
"
;
}
File[] childs
=
f.listFiles();
for
(
int
i
=
0
;i
<
childs.length;i
++
)
{
System.out.println(strlen
+
childs[i].getName());
if
(childs[i].isDirectory())
{
tree(childs[i],level
+
1
);
}
}
}
posted on 2009-03-23 20:43
jimphei
閱讀(69)
評論(0)
編輯
收藏
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發表評論。
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
Powered by:
BlogJava
Copyright © jimphei
主站蜘蛛池模板:
任丘市
|
兴仁县
|
阜平县
|
方正县
|
南靖县
|
保德县
|
虞城县
|
兴义市
|
林周县
|
慈利县
|
蒙城县
|
河北区
|
大英县
|
辽阳市
|
田林县
|
西和县
|
社会
|
南华县
|
如东县
|
大荔县
|
永清县
|
崇礼县
|
怀宁县
|
安陆市
|
喜德县
|
新疆
|
闻喜县
|
福州市
|
广元市
|
海口市
|
望谟县
|
北流市
|
工布江达县
|
扬州市
|
灌南县
|
子洲县
|
浠水县
|
垣曲县
|
阳江市
|
常山县
|
桑日县
|