33.( )
The file "file.txt" exists on the file system and contains ASCII text.
try{
File f=new File("file.txt");
OutputStream out=new FileOutputStream(f);
}catch (IOException e){}
A. the code does not compile
B. the code runs and no change is made to the file
C. the code runs and sets the length of the file to 0 。
D. An exception is thrown because the file is not closed
E. the code runs and deletes the file from the file system 34.( )
The file “file.txt” exists on the file system and contains ASCII text.
Given:
38. try {
39. File f = new File(“file.txt”);
40. OutputStream out = new FileOutputStream(f, true);
41. }
42. catch (IOException) {}
What is the result?
A. The code does not compile。
B. The code runs and no change is made to the file.
C. The code runs and sets the length of the file to 0.
D. An exception is thrown because the file is not closed.
E. The code runs and deletes the file from the file system.
请帮忙详细解释两道题都是考什么方面的知识的。为什么。
The file "file.txt" exists on the file system and contains ASCII text.
try{
File f=new File("file.txt");
OutputStream out=new FileOutputStream(f);
}catch (IOException e){}
A. the code does not compile
B. the code runs and no change is made to the file
C. the code runs and sets the length of the file to 0 。
D. An exception is thrown because the file is not closed
E. the code runs and deletes the file from the file system 34.( )
The file “file.txt” exists on the file system and contains ASCII text.
Given:
38. try {
39. File f = new File(“file.txt”);
40. OutputStream out = new FileOutputStream(f, true);
41. }
42. catch (IOException) {}
What is the result?
A. The code does not compile。
B. The code runs and no change is made to the file.
C. The code runs and sets the length of the file to 0.
D. An exception is thrown because the file is not closed.
E. The code runs and deletes the file from the file system.
请帮忙详细解释两道题都是考什么方面的知识的。为什么。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货