上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要: in操作符,在可选范围内查找数据:1 USE test;2 -- 可以选取指定值,在...中3 SELECT * FROM city WHERE `Name` in ('Kabul','Herat')BETWEEN操作符:1 USE test;2 SELECT * FROM city WHERE I... 阅读全文
posted @ 2015-08-13 19:27 pepelu 阅读(877) 评论(0) 推荐(0) 编辑
摘要: 整理自:http://blog.51yip.com/mysql/1311.html显示创建表的信息:1 USE world;2 SHOW CREATE TABLE city;显示表结构信息:1 CREATE TABLE `city` (2 `ID` int(11) NOT NULL AUTO_I... 阅读全文
posted @ 2015-08-13 18:39 pepelu 阅读(310) 评论(0) 推荐(0) 编辑
摘要: CREATE DATABASE- 创建新数据库ALTER DATABASE- 修改数据库CREATE TABLE- 创建新表ALTER TABLE- 变更(改变)数据库表DROP TABLE- 删除表CREATE INDEX- 创建索引(搜索键)DROP INDEX- 删除索引创建数据库:1 -- ... 阅读全文
posted @ 2015-08-13 16:40 pepelu 阅读(669) 评论(0) 推荐(0) 编辑
摘要: 通过Properties类从文件中读取配置信息,从而可以避免大量的代码修改。1、新建fruit.properties(文件名任意,路径在项目默认目录下),并写入内容:1 apple=properties.Apple2 banana=properties.Banana2、编写Fruit接口:1 pub... 阅读全文
posted @ 2015-08-12 16:16 pepelu 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 转载自博客:http://www.cnblogs.com/rollenholt/archive/2011/09/02/2163758.html 获得类加载器: 1 public static void main(String[] args) { 2 Person p1=new Person(); 3 阅读全文
posted @ 2015-08-11 20:09 pepelu 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 类加载方法:所有类的对象都是Class的实例。类加载时会先加载static静态部分,并且从父类的static到子类static依次加载。final语句块会作为宏定义被加载到特殊位置。Person类: 1 public class Person { 2 private String name;... 阅读全文
posted @ 2015-08-11 16:01 pepelu 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 主类: 1 public class DownThreadDemo { 2 3 public static void main(String[] args) { 4 // TODO Auto-generated method stub 5 int threa... 阅读全文
posted @ 2015-08-10 20:11 pepelu 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 下载: 1 void downloadDemo() { 2 String fileName = "E:" + File.separator + "test" + File.separator 3 + "baidu.png"; 4 URL... 阅读全文
posted @ 2015-08-10 13:34 pepelu 阅读(186) 评论(0) 推荐(0) 编辑
摘要: http://ifeve.com/buffers/使用通道: 1 void channelDemo() { 2 RandomAccessFile aFile = null; 3 ByteBuffer buf = ByteBuffer.allocate(48); 4 ... 阅读全文
posted @ 2015-08-09 14:05 pepelu 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Callable 接口是一个具有类型参数的泛型,它的 call() 方法返回一个泛型,并且可以抛出异常。必须使用 ExecutorService#submit() 方法调用它。 1 public class TaskWithResult implements Callable { 2 3 ... 阅读全文
posted @ 2015-08-08 15:13 pepelu 阅读(428) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 下一页