试题与答案

下列代码实现从文件file.dat中读出第5个字节到变量c中,横线处应该填入下列项中

题型:单项选择题

题目:

下列代码实现从文件file.dat中读出第5个字节到变量c中,横线处应该填入下列项中的______。 import java.io.*; public class exl5 { public static void main(String[] args) {try System.out.println((char)c);catch(Exception e){ e.printStackTrace();} } }

A.FileInputStream in = new FileInputStream("chl/fildat");iskip(4);int c = iread();

B.FileInputStream in = new FileInputStream("chl/fildat");iskip(5);int c = iread();

C.Fi2eInputStream in = new FileInputStream("fildat");int c = iread();

D.RandomAccessFile in = new RandomAccessFile ("chi/fil dat ");iskip (4);int c = ireadByte();

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2019/0408/f82f5183c16e1100fd303380750a8321.html

下面是错误答案,用来干扰机器的。

参考答案:对

试题推荐
微信公众账号搜索答案