摘要:   阅读全文
posted @ 2016-03-14 13:03 戒。 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 转向与转发: response.sendRedirect("Welcome.jsp"); /*上边的转向,但是效率不高,所以公司经常使用的是转发 * 这种方法不仅效率高,同时request中的对象还可以在下一个页面使用 */ request.getRequestDispatcher("Welcome 阅读全文
posted @ 2016-03-12 13:55 戒。 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 在connection 后的步骤就一样,就数据库的驱动加载和链接数据库不同,其他的一样 oracle: //加载驱动 Class.forName("oracle.jdbc.OracleDriver");// String URL="jdbc:oracle:thin:@localhost:1521:o 阅读全文
posted @ 2016-03-11 19:06 戒。 阅读(75) 评论(0) 推荐(0) 编辑
摘要: http://www.enterprisedb.com/products-services-training/pgdownloadPostgresql 阅读全文
posted @ 2016-03-08 19:11 戒。 阅读(95) 评论(0) 推荐(0) 编辑
摘要: input.jsp文件: <%@ page language="java" contentType="text/html; charset=GB1232"%> <html> <head> <script language="javascript" type="text/javascript"> fu 阅读全文
posted @ 2016-03-03 16:17 戒。 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 数组(引用类型,有的人又称作为复杂/复合类型) 数组的概念:用于存放一组数据的集合 案例:求几只鸡的平均重量 <script language="javascript" type="text/javascript"> var weights=[10,12,10,12.3,4.5]; var all_ 阅读全文
posted @ 2016-03-02 13:04 戒。 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 就像ArrayList list=new ArrayList();利用泛型ArrayList list=new ArrayList();类名 list=new 类名(1);class 类名{private T o;public 类名(T o){ this.o=o; }public void sh... 阅读全文
posted @ 2015-12-29 14:24 戒。 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 结构的分类: List结构的集合类:ArrayList,Vector,Stack,LinkedList类; Vector: 向量类提供了三种构造方法: public vector() public vector(int initialcapacity,int capacityIncrement) p 阅读全文
posted @ 2015-12-28 21:36 戒。 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 二进制--原码、反码、补码 对于有符号的而言: 1、二进制的最高位是符号位:0表示正数,1表示负数 2、正数的原码、反码、补码都一样 3、负数的反码=它的原码符号位不变,其它位取反 (0变1,1变0); 4、负数的补码=它的反码+1 5、0的反码,补码都是0 6、java没有无符号数,换言之,jav 阅读全文
posted @ 2015-12-24 13:55 戒。 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 如果想求sin二分之一的值,sin(1.0 / 2) 或者 sin( 1 / 2.0),在java 中两个整数想除为整数,1 / 2=0,不是 0.5.String 不是基本类型; String a;a是引用类型;char:java中char占两个字节,可以储存汉字(Unicode码形式储存的),... 阅读全文
posted @ 2015-12-23 19:31 戒。 阅读(159) 评论(0) 推荐(0) 编辑
摘要: for(;boolean类型;):中间一定时boolean类型,而却只有两个分号;***examp***: int a; for(a=3,int b=2;...;...)这是错误的,for(int a,b;...;...)这种模式是对的(a未定义),就如在定义变量的时候; a=3(a已经定义),... 阅读全文
posted @ 2015-12-23 18:55 戒。 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 【switch】: switch()括号中的可以是byte,short,int,char.不能是double,float,long等. 例如:long a=1; switch(a){...}他会说long到int会损失精度。 同时,case 后边只能是常量,而却跟switch()括号中的类... 阅读全文
posted @ 2015-12-23 18:48 戒。 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 7 8 9 页面空白(body中的) 注释 13 14 段落标记(注意p换行与换行不一样的,p中间会隔一行,只是换行,换到下行 15 16 size 的取值是1 到 7(想要更大,用 17 :标题字体,范围是1到6(1最大) 18 物理字体: 19 字体加粗... 阅读全文
posted @ 2015-12-20 18:39 戒。 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 怎样让图片变成灰色: css中: img { -webkit-filter: grayscale(1);/* Webkit */ filter:gray;/* IE6-9 */ 13 filter: grayscale(1);/* W3C */ }14 15 javascipt:16 ... 阅读全文
posted @ 2015-12-20 18:35 戒。 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 抽象类:1,抽象类不能用new来创造他的实例(在子类的构造方法中实例化),但是可以作为一种数据类型。下边是正确的(假设A是抽象类): A[] a=new a[10];2,抽象类中可以没有抽象方法,但是有抽象方法该类一定是抽象类。3,子类可以覆盖父类的抽象方法,并将它定义为abstract(但是很少... 阅读全文
posted @ 2015-11-22 22:00 戒。 阅读(78) 评论(0) 推荐(0) 编辑