上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页
摘要: 1 package hjw; 2 3 import java.util.Scanner; 4 import java.util.Date; 5 import java.text.SimpleDateFormat; 6 import java.text.ParseException; 7 public class ScannerDemo { 8 public static void main(String[] args) { 9 Scanner sc=new Scanner(System.in);10 String str=null;11 Date dt=nu... 阅读全文
posted @ 2012-03-25 19:58 谈笑风生膜法师 阅读(709) 评论(0) 推荐(0)
摘要: 1 package hjw; 2 3 import java.util.Scanner; 4 5 public class ScannerDemo { 6 public static void main(String[] args) { 7 Scanner sc=new Scanner(System.in); 8 int i=0; 9 float f=0.0f;10 System.out.println("输入整数:");11 if(sc.hasNextInt()){//判断输入的是否是整数12 i=sc.nextInt()... 阅读全文
posted @ 2012-03-25 19:51 谈笑风生膜法师 阅读(445) 评论(0) 推荐(1)
摘要: 1 package hjw; 2 import java.io.BufferedReader; 3 import java.io.IOException; 4 import java.io.InputStreamReader; 5 import java.text.ParseException; 6 import java.text.SimpleDateFormat; 7 import java.util.Date; 8 class InputData{ 9 private BufferedReader buf=null;10 public InputData(){11 ... 阅读全文
posted @ 2012-03-22 22:17 谈笑风生膜法师 阅读(343) 评论(0) 推荐(0)
摘要: 1 import java.io.BufferedReader; 2 import java.io.IOException; 3 import java.io.InputStreamReader; 4 public class BufferdReaderDemo1 { 5 public static void main(String[] args) { 6 BufferedReader buf=new BufferedReader(new InputStreamReader(System.in)); 7 String str=null; 8 ... 阅读全文
posted @ 2012-03-22 21:31 谈笑风生膜法师 阅读(3329) 评论(0) 推荐(0)
摘要: 1 import java.io.File; 2 import java.io.InputStream; 3 import java.io.PrintStream; 4 public class PrintDemo { 5 public static void main(String[] args) throws Exception{ 6 InputStream ipt=System.in;//通过键盘接收 7 StringBuffer buf=new StringBuffer(); 8 System.out.print("请输入:")... 阅读全文
posted @ 2012-03-22 21:01 谈笑风生膜法师 阅读(277) 评论(0) 推荐(0)
摘要: 1 import java.io.File; 2 import java.io.FileOutputStream; 3 import java.io.PrintStream; 4 public class PrintDemo { 5 public static void main(String[] args) throws Exception{ 6 PrintStream ps=new PrintStream(new FileOutputStream(new File("d:"+File.separator+"te.txt"))); 7 ps.prin. 阅读全文
posted @ 2012-03-22 20:37 谈笑风生膜法师 阅读(320) 评论(0) 推荐(0)
摘要: 1 import java.io.File; 2 import java.io.FileInputStream; 3 import java.io.FileOutputStream; 4 import java.io.InputStream; 5 import java.io.OutputStream; 6 import java.io.IOException; 7 import java.io.FileNotFoundException; 8 public class Copy { 9 public static void main(String[] args) throw... 阅读全文
posted @ 2012-03-22 20:03 谈笑风生膜法师 阅读(1790) 评论(1) 推荐(0)
摘要: 1 package hjw; 2 import java.io.IOException; 3 import java.io.PipedInputStream; 4 import java.io.PipedOutputStream; 5 class Send implements Runnable{ 6 private PipedOutputStream pos=null; 7 public Send(){ 8 this.pos=new PipedOutputStream(); 9 }10 public void run(){11 ... 阅读全文
posted @ 2012-03-21 21:41 谈笑风生膜法师 阅读(383) 评论(0) 推荐(0)
摘要: 1 package hjw; 2 import java.io.ByteArrayInputStream; 3 import java.io.ByteArrayOutputStream; 4 import java.io.IOException; 5 //import org.omg.CORBA_2_3.portable.OutputStream; 6 public class dm { 7 public static void main(String[] args) throws Exception { 8 String str="HELLOWORLD"; 9 ... 阅读全文
posted @ 2012-03-20 21:30 谈笑风生膜法师 阅读(2171) 评论(0) 推荐(0)
摘要: 1 import java.io.File; 2 import java.io.InputStream; 3 import java.io.FileInputStream; 4 //import org.omg.CORBA_2_3.portable.OutputStream; 5 public class dm { 6 public static void main(String[] args) throws Exception { 7 File f=new File("d:"+File.separator+"te.txt"); 8 InputStre. 阅读全文
posted @ 2012-03-20 20:45 谈笑风生膜法师 阅读(290) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页