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
主站蜘蛛池模板:
铜川市
|
桦川县
|
红安县
|
舟山市
|
广宁县
|
右玉县
|
安徽省
|
宿松县
|
高淳县
|
山东
|
阜阳市
|
定襄县
|
台江县
|
合江县
|
安顺市
|
淮北市
|
镇原县
|
大冶市
|
大兴区
|
台山市
|
白城市
|
长寿区
|
三河市
|
和平县
|
游戏
|
长子县
|
武穴市
|
渝中区
|
汉阴县
|
中卫市
|
大兴区
|
阿尔山市
|
射洪县
|
丽江市
|
洛隆县
|
威远县
|
平邑县
|
宁化县
|
固原市
|
施秉县
|
延津县
|