精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • 1、編寫一個(gè)程序,將兩個(gè)Java程序文件顯示到屏幕上.

    1、編寫一個(gè)程序,將兩個(gè)Java程序文件顯示到屏幕上.
    import java.io.*;
    public class SequenceInputStreamDemo{
    public static void main(String args[]){
    _______(1)___________fis1,fis2;
    try{
    fis1=new FileInprtStream(“prog1.java”);
    fis2=new FileInprtStream(“prog2.java”);
    _________(2)___________;
    while((buf=________(3)_________)>0) System.out.print((char)buf);
    ________(4)_______;
    fis2.close();
    }________(5)_________{
    System.out.println(e);
    }
    2.完成下列程序.
    public class Name{
    private String useName;
    private String useS;
    public _______(1)Name{
    _______(2) useName =”whatever”; useS=”whatever”;}
    public _______(3)Name (String s)
    {int i=s._______(4)___________;//搜索空格
    if(_______(5)___________){
    useName=s.substring(0,i);
    useS=s.substring(i+1);}}}
    3、定義一個(gè)Demo執(zhí)行類.要求可根據(jù)客戶不同要求計(jì)算出矩形、圓的周長和面積.
    4、編寫程序,使界面中包含3個(gè)標(biāo)簽,其背景分別為紅、黃、藍(lán)3色
    5、實(shí)現(xiàn)文件的復(fù)制,并輸出.
    其他人氣:838 ℃時(shí)間:2020-07-11 06:41:09
    優(yōu)質(zhì)解答
    1
    (1) FileInputStream
    (2) char buf;
    (3) (char) fis1.read()
    (4) while ((buf = (char) fis2.read()) > 0) System.out.print((char) buf);
    fis1.close();
    (5)catch (FileNotFoundException e)
    你題目抄的有點(diǎn)問題 附上可執(zhí)行源碼
    public class SequenceInputStreamDemo {
    public static void main(String[] args) {
    // _______(1)___________fis1,fis2;
    FileInputStream fis1,fis2;
    try {
    fis1 = new FileInputStream("prog1.java");
    fis2 = new FileInputStream("prog2.java");
    // _________(2)___________;
    char buf;
    // while((buf=________(3)_________)>0) System.out.print((char)buf);
    while ((buf = (char) fis1.read()) > 0) System.out.print((char) buf);
    // ________(4)_______;
    while ((buf = (char) fis2.read()) > 0) System.out.print((char) buf);
    fis1.close();
    fis2.close();
    // }________(5)_________{
    } catch (FileNotFoundException e) {
    System.out.println(e);
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    }
    }
    2
    (1) 什么也不填
    (2) super();
    (3) 什么也不填
    (4) .indexOf(" ");
    (5)i > 0
    可執(zhí)行代碼:
    public class Name {
    private String useName;
    private String useS;
    // public _______(1)Name{
    public Name() {
    // _______(2) useName =”whatever”; useS=”whatever”;}
    super();
    useName = "whatever";
    useS = "whatever";
    }
    // public _______(3)Name (String s)
    public Name(String s) {
    // {int i=s._______(4)___________;//搜索空格
    int i = s.indexOf(" ");
    // if(_______(5)___________){
    if (i > 0) {
    useName = s.substring(0,i);
    useS = s.substring(i + 1);
    }
    }
    }
    我來回答
    類似推薦
    請(qǐng)使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點(diǎn),以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機(jī)版