好文档 - 专业文书写作范文服务资料分享网站

java-期末考试试题(含答案)

天下 分享 时间: 加入收藏 我要投稿 点赞

String str=\学号\ 姓名\性别\ 系别\

sums+=str+\ System.out.println(str); try { fw = new (\ fw.write(sums); fw.close(); } catch (IOException e) { // TODO 自动生成 catch 块 e.printStackTrace(); } //两个写入都可以 /* ; try { fos = new (\ PrintStream ps=new PrintStream(fos); ps.print(str); } catch ( e) { // TODO 自动生成 catch 块 e.printStackTrace(); } */ a.setText(\ } } });

b2.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent arg0) { int m; fr; try { fr = new (\ BufferedReader br=new BufferedReader(fr); String s=br.readLine(); while(s!=null) { a.append(s); a.append(\ s=br.readLine(); } } catch ( e) { // TODO 自动生成 catch 块 e.printStackTrace(); } catch (IOException e) { // TODO 自动生成 catch 块 e.printStackTrace();

} }}); }

public static void main(String[] args) { A2 n=new A2(); // TODO 自动生成方法存根 } }

java-期末考试试题(含答案)

Stringstr=\学号\姓名\性别\系别\sums+=str+\System.out.println(str);try{fw=new(\fw.write(sums);fw.close();}catch(IOExcep
推荐度:
点击下载文档文档为doc格式
9u42k1gx7j9uewu2s0h44x67j2pwjr01e7y
领取福利

微信扫码领取福利

微信扫码分享