中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

建手機(jī)網(wǎng)站價(jià)格企業(yè)網(wǎng)站seo哪里好

建手機(jī)網(wǎng)站價(jià)格,企業(yè)網(wǎng)站seo哪里好,怎么制作網(wǎng)站賣東西,怎樣做p2p網(wǎng)站1.getAbsolutePath() 得到絕對(duì)路徑、全路徑。 getpath() 得到縮寫的路徑,根據(jù)當(dāng)前目錄位置可以縮寫路徑。得到相對(duì)路徑。 getCanonicalPath() 得到標(biāo)準(zhǔn)路徑,將統(tǒng)一平臺(tái)間的路徑寫法差異。 File的這三個(gè)方法在api中都有說明,僅以程序?yàn)槔f明。…

1.getAbsolutePath()?得到絕對(duì)路徑、全路徑。

?? getpath()?得到縮寫的路徑,根據(jù)當(dāng)前目錄位置可以縮寫路徑。得到相對(duì)路徑。

? ?getCanonicalPath()?得到標(biāo)準(zhǔn)路徑,將統(tǒng)一平臺(tái)間的路徑寫法差異。

File的這三個(gè)方法在api中都有說明,僅以程序?yàn)槔f明。
package?test;
import? java.io.File;
import?java.io.IOException;
public?class?TestFilePath?{
?
?public?static?void?main(String[]?args)?{
??//?TODO?Auto-generated?methodstub
??System.out.println(System.getProperty("user.dir"));
??
??try?{
???System.out.println("-----默認(rèn)相對(duì)路徑:取得路徑不同------");
?? ?File?file1?=new?File("..\\src\\test1.txt");
???System.out.println( file1.getPath());
???System.out.println( file1.getAbsolutePath());
???System.out.println(file1.getCanonicalPath());
???System.out.println("-----默認(rèn)相對(duì)路徑:取得路徑不同------");
???File?file?=new?File(".\\test1.txt");
???System.out.println(file.getPath());
???System.out.println(file.getAbsolutePath());
???System.out.println(file.getCanonicalPath());
???
???System.out.println("-----默認(rèn)絕對(duì)路徑:取得路徑相同------");
???File?file2?=new?File("D:\\workspace\\test\\test1.txt");
???System.out.println(file2.getPath());
???System.out.println(file2.getAbsolutePath());
???System.out.println(file2.getCanonicalPath());
??}?catch?(IOException?e)?{
???//?TODOAuto-generated?catch?block
???e.printStackTrace();
??}
?}
}
程序執(zhí)行結(jié)果如下:
F:\eclipseworkspace\testejb
-----默認(rèn)相對(duì)路徑:取得路徑不同------
..\src\test1.txt
F:\eclipseworkspace\testejb\..\src\test1.txt
F:\eclipseworkspace\src\test1.txt
-----默認(rèn)相對(duì)路徑:取得路徑不同------
.\test1.txt
F:\eclipseworkspace\testejb\.\test1.txt
F:\eclipseworkspace\testejb\test1.txt
-----默認(rèn)絕對(duì)路徑:取得路徑相同------
D:\workspace\test\test1.txt
D:\workspace\test\test1.txt
D:\workspace\test\test1.txt
結(jié)論:
當(dāng)輸入為絕對(duì)路徑時(shí),返回的都是絕對(duì)路徑。
當(dāng)輸入為相對(duì)路徑時(shí):
getPath()返回的是File構(gòu)造方法里的路徑,是什么就是什么,不增不減
getAbsolutePath()返回的其實(shí)是user.dir+getPath()的內(nèi)容,從上面F:\eclipseworkspace\testejb、F:\eclipseworkspace\testejb\..\src\test1.txt、F:\eclipseworkspace\testejb\.\test1.txt可以得出。
getCanonicalPath()返回的就是標(biāo)準(zhǔn)的將符號(hào)完全解析的路徑


?

?

http://www.risenshineclean.com/news/52587.html

相關(guān)文章:

  • 群暉nas可以做網(wǎng)站百度seo怎么提高排名
  • 豬八戒官網(wǎng)做網(wǎng)站專業(yè)嗎企業(yè)網(wǎng)絡(luò)
  • 自己做的網(wǎng)站如何百度能搜索企業(yè)關(guān)鍵詞排名優(yōu)化網(wǎng)址
  • 最吸引人的廣告圖片seo教學(xué)免費(fèi)課程霸屏
  • 自己設(shè)計(jì)圖紙的軟件佛山百度快照優(yōu)化排名
  • 能在線做初中題的網(wǎng)站適合小學(xué)生的新聞事件
  • 可以用來做視頻網(wǎng)站的視頻外鏈嗎網(wǎng)絡(luò)營(yíng)銷專員的就業(yè)前景
  • 產(chǎn)品經(jīng)理做網(wǎng)站網(wǎng)站頁面
  • 跨境電子商務(wù)網(wǎng)站建設(shè)ks免費(fèi)刷粉網(wǎng)站推廣
  • 網(wǎng)絡(luò)運(yùn)營(yíng)一個(gè)月工資寧波seo推廣方式排名
  • 荔灣做網(wǎng)站上海優(yōu)化公司排行榜
  • wordpress pdf 免費(fèi)濰坊seo按天收費(fèi)
  • flash做安卓游戲下載網(wǎng)站百度官方首頁
  • 《水利建設(shè)與管理》雜志社網(wǎng)站上海高端網(wǎng)站定制
  • Linux下使用wordpress公司seo排名優(yōu)化
  • 提供專業(yè)網(wǎng)站建設(shè)平臺(tái)收錄是什么意思
  • 心得體會(huì)萬能模板免費(fèi)網(wǎng)站seo
  • 有些網(wǎng)站下方只有版權(quán)沒有ICP簡(jiǎn)述seo和sem的區(qū)別與聯(lián)系
  • 北京網(wǎng)站推廣怎么做不屬于網(wǎng)絡(luò)推廣方法
  • 公司網(wǎng)站建設(shè)需要多少錢googleplay官方下載
  • 買2g 空間做下載網(wǎng)站全網(wǎng)搜索關(guān)鍵詞查詢
  • 邯鄲網(wǎng)站設(shè)計(jì)哪家好好省推廣100種方法
  • h5可以用什么網(wǎng)站做app推廣渠道商
  • 幫企業(yè)建網(wǎng)站步驟seo公司杭州
  • 網(wǎng)站設(shè)計(jì)美工多少搜索引擎優(yōu)化大致包含哪些內(nèi)容或環(huán)節(jié)
  • xp怎么做網(wǎng)站服務(wù)器太原做網(wǎng)站的
  • wordpress播放本地mp3seo關(guān)鍵詞排名注冊(cè)價(jià)格
  • 全市網(wǎng)站建設(shè)情況摸底調(diào)查百度網(wǎng)站關(guān)鍵詞排名查詢
  • 網(wǎng)站設(shè)計(jì)制作費(fèi)用多少怎么做互聯(lián)網(wǎng)營(yíng)銷推廣
  • 南陽東莞網(wǎng)站建設(shè)公司優(yōu)化排名推廣關(guān)鍵詞