第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

怎么理解IO數(shù)據(jù)流的對象和運行原理?

怎么理解IO數(shù)據(jù)流的對象和運行原理?

Rvie 2017-11-23 21:55:21
package?day7; import?java.io.DataInput; import?java.io.DataInputStream; import?java.io.DataOutputStream; import?java.io.FileInputStream; import?java.io.FileNotFoundException; import?java.io.FileOutputStream; import?java.io.IOException; import?java.util.Scanner; public?class?OpenrData?{ public?static?void?main(String[]?args)?throws?IOException?{ Scanner?sc=new?Scanner(System.in); System.out.println("請輸入要轉(zhuǎn)化的數(shù)據(jù)文件:"); DataOutputStream?dos?=new?DataOutputStream(dos); DataInputStream?dis?=null; try?{ dos.writeDouble(Math.random()); dos.flush(); dis=new?DataInputStream(dis); System.out.println(dis.readBoolean()); System.out.println(dis.readDouble()); ??} catch?(Exception?e)?{ //?TODO:?handle?exception e.printStackTrace(); } finally?{ try?{ if(dis?!=?null){ ??????????????????????dis.close(); ????????????????} ????if(dos?!=?null){ ????????????????????????dos.close(); ??????????????????} }?catch?(Exception?e2)?{ //?TODO:?handle?exception ??e2.printStackTrace(); } } } } 在class往后的第五行中的dos總是顯示報錯,這是為什么,還有IO數(shù)據(jù)流到底是從哪里到哪里 我完全懵了,求大神幫幫我!
查看完整描述

1 回答

已采納
?
產(chǎn)品經(jīng)理不是經(jīng)理

TA貢獻481條經(jīng)驗 獲得超143個贊

??DataOutputStream?dos?=new?DataOutputStream(dos);這句代碼什么意思

查看完整回答
反對 回復(fù) 2017-11-24
  • Rvie
    Rvie
    好吧,其實我也不會做new的部分,因為是搞混了的,你能幫我修改嗎?
  • 1 回答
  • 0 關(guān)注
  • 1102 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號