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獲得指定時間幾天前或幾天后的日期(1290)
2.?spring結合velocity的應用實例(1153)
3.?Struts2+JQuery+JSON集成(833)
4.?velocity的默認加載路徑修改(554)
5.?安裝Apache+PHP在Windows+IIS下(348)
評論排行榜
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
閱讀(71)
評論(0)
編輯
收藏
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發表評論。
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
Powered by:
BlogJava
Copyright © jimphei
主站蜘蛛池模板:
东阿县
|
南城县
|
怀柔区
|
明光市
|
信丰县
|
搜索
|
九江县
|
黔西县
|
玛纳斯县
|
吉水县
|
永城市
|
湄潭县
|
马尔康县
|
青川县
|
江川县
|
宜宾县
|
华容县
|
沂南县
|
嘉善县
|
临汾市
|
惠水县
|
普宁市
|
胶南市
|
辽阳市
|
墨玉县
|
石门县
|
拜泉县
|
鹤山市
|
盐山县
|
铜梁县
|
正蓝旗
|
夹江县
|
麻栗坡县
|
会昌县
|
叙永县
|
阿合奇县
|
汾阳市
|
洪泽县
|
高要市
|
德阳市
|
金堂县
|