摘要:
总结:这个结果竟然是对的。我错了。package com.da;//创建一个String对象的数组,然后执行读取文本,把文本每一行存入数组,它将读取到100行//或直接到你按”stop“才停止,该例运用了一个BufferedReader类从控制台读取数据import java.io.InputStreamReader;import java.io.*;public class SocketDemo { public static void main(String[] args) throws IOException { BufferedReader bf = new BufferedRead. 阅读全文
摘要:
总结:package com.da;import java.awt.Button;import java.awt.Color;import java.awt.FlowLayout;import java.awt.Label;import javax.swing.JButton;import javax.swing.JFrame;import java.awt.*;public class ty {static JFrame f=new JFrame("javaGUI编程"); static JButton j1=new JButton("进入"); st 阅读全文
摘要:
package com.da;//toString()方法,//Object类重写。。。public class ty { private String name; private int age; private double high; private String sex; public ty(String a, int b, double c, String d) { name = a; age = b; high = c; sex = d; } public String getName() { return name; } public void setName(Stri... 阅读全文
摘要:
总结:new FileInputStreampackage com.ds;import java.io.*;import com.da.fgbv;public class rter { public static void main(String[] args) throws IOException { int i; FileInputStream fis; try { fis = new FileInputStream("sdt.tdt");// 打开文件 // fis.read(); } catch (FileNotFoundException E) { System. 阅读全文