亚洲喷奶水中文字幕电影,日本aⅴ高清一区二区三区,欧美亚洲日本国产,欧美日韩亚洲中文字幕

<legend id="flx4p"><abbr id="flx4p"><thead id="flx4p"></thead></abbr></legend>

<mark id="flx4p"><thead id="flx4p"></thead></mark>

      我要投稿 投訴建議

      計算機二級Java測試題及答案

      時間:2021-01-05 19:36:58 計算機等級 我要投稿

      2016年計算機二級Java測試題及答案

        1.寫出以下程序的運行結(jié)果。

      2016年計算機二級Java測試題及答案

        class First {

        First(  ) {

        System.out.println ("in First"); } }

        public class Second extends First { Second(  ) {

        System.out.println("in Second"); } public static void main(String[] args) { Second mine= new Second(  ); } }

        程序運行的結(jié)果:

        in First in Second

        2.解釋程序中語句的含義

        純文本文件f1.txt中的內(nèi)容是 abcd

        下面的.程序?qū)1.txt文件中的內(nèi)容寫到f2.txt文件中和屏幕上 import java.io.*;

        public class filecopy {

        public static void main(String[] args) { try {

        StringBuffer str=new StringBuffer(  );

        FileInputStream fin=new FileInputStream("f1.txt");

        意義

        FileOutputStream fout=new FileOutputStream("f2.txt");

        意義

        int c;

        while((c=fin.read(  ))!=-1) {

        fout.write(c); 意義

        str.append((char)c); 意義

        }

        fin.close(  ); fout.close(  );

        String str2=str.toString(  );

        System.out.println(str2); 顯示的結(jié)果是

        }catch(Exception c) {

        System.out.println(c); } } }

        實例化輸入流對象,指定輸入流來源文件為f1.txt 實例化輸出流對象,指定輸出流目標(biāo)文件為f2.txt 將C寫入到輸出流對象中

        將整數(shù)C轉(zhuǎn)化為字符,并添加到字符串str的尾部 abcd

      【計算機二級Java測試題及答案】相關(guān)文章:

      計算機二級java精選試題及答案01-23

      計算機二級JAVA沖刺試題及答案01-25

      計算機考試《二級java》試題及答案01-18

      計算機二級Java備考沖刺試題及答案01-23

      2016計算機二級JAVA沖刺試題及答案02-20

      2017計算機二級《JAVA》選擇題及答案07-29

      計算機二級考試Java模擬題及答案09-21

      計算機二級C語言測試題及答案01-21

      全國計算機等級考試二級java精選試題及答案01-20