上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 26 下一页
摘要: 1. 由 基本数据型态转换成 String String 类别中已经提供了将基本数据型态转换成 String 的 static 方法 也就是 String.valueOf() 这个参数多载的方法 有下列几种 String.valueOf(boolean b) : 将 boolean 变量... 阅读全文
posted @ 2015-11-09 22:00 超宇 阅读(150) 评论(0) 推荐(0) 编辑
摘要: import java.io.*;import java.util.*;class RunCount{ public static void main(String[] args) throws IOException { Properties pro = new Properties();... 阅读全文
posted @ 2015-11-07 17:55 超宇 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 集合框架 List结构的集合类 ArrayList类,LinkedList类,Vector类,Stack类 ArrayList集合类的使用方法(无同步性,线程不安全) [java] view plaincopyprint? //ArrayList --- 实现... 阅读全文
posted @ 2015-11-05 16:16 超宇 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 流的操作规律 之所以要弄清楚这个规律,是因为流对象太多,开发时不知道用哪个对象合适. 想知道开发时用到哪些对象,只要通过四个明确即可 1.明确源和目的 源:InputStream Reader 目的:OutputStream Writer 2.明确数据是否是纯文本数据. 源: 是纯文本 Rea... 阅读全文
posted @ 2015-11-05 15:52 超宇 阅读(126) 评论(0) 推荐(0) 编辑
摘要: public class InputStreamReaderextends Reader InputStreamReader 是字节流通向字符流的桥梁:它使用指定的 charset 读取字节并将其解码为字符。它使用的字符集可以由名称指定或显式给定,或者可以接受平台默认的字符集。 每... 阅读全文
posted @ 2015-11-05 15:14 超宇 阅读(315) 评论(0) 推荐(0) 编辑
摘要: /**录入键盘输入字母并将小写变为大写*/import java.io.*;class readin { public static void main(String[] args)throws IOException { InputStream in = System.in;//引入输入流... 阅读全文
posted @ 2015-11-05 14:50 超宇 阅读(317) 评论(0) 推荐(0) 编辑
摘要: import java.io.*;class copymp3 { public static void main(String[] args) { BufferedInputStream bis = null; BufferedOutputStream bos = null; try ... 阅读全文
posted @ 2015-11-05 11:09 超宇 阅读(154) 评论(0) 推荐(0) 编辑
摘要: import java.io.*;class copypic { public static void main(String[] args) { FileOutputStream fos = null; FileInputStream fis = null; try { fos ... 阅读全文
posted @ 2015-11-05 10:23 超宇 阅读(179) 评论(0) 推荐(0) 编辑
摘要: int读0000时显示为0,谢了下面一个转换的小程序: public class num { public String getNumber(int num) { String result = ""; switch ((num+"").length()) { case 1: re... 阅读全文
posted @ 2015-11-04 17:54 超宇 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 字段摘要 protected Object lock 用于同步针对此流的操作的对象。 构造方法摘要 protected Writer() 创建一个新的字符流 writer,其关键部分将同步 writer 自身。... 阅读全文
posted @ 2015-11-03 17:41 超宇 阅读(908) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 26 下一页