- 博客(13)
- 收藏
- 关注
java List 排序实例详解
//1.新建一个实体类Userpublic class User { String name; Integer age; public User(String name, Integer age) { super(); this.age = age; this.name = name; } public String getName()...
2011-10-17 11:41:59 119
原创 JavaScript正则表达式
<html><head><title>JavaScript RegExp</title> <script type="text/javascript"> /********************** /* var reg = /test/; var str = 'testString'; v...
2011-05-11 17:11:49 101
原创 Collections集合排序
import java.util.ArrayList;import java.util.Collections;public class ListSort { public static void main(String[] args) { ArrayList<Integer> list = new ArrayList<Integer>(); ...
2011-05-11 17:09:12 120
原创 显示一个电子时钟
<html><head><script type="text/javascript">function startTime(){var today=new Date()var h=today.getHours()var m=today.getMinutes()var s=today.getSeconds()// add a z...
2011-04-30 11:30:46 211
原创 获取时间和If..else的使用
<html><body><script type="text/javascript">var d = new Date()var time = d.getHours()var m = d.getMinutes();var s = d.getSeconds();if (m<10) {document.write(time+...
2011-04-30 10:11:55 181
原创 字节数组转换为16进制字符串
/** * 2011-04-26 * @author chase * 字节数组转换为16进制字符串 */public class BytetoHex { public static final String encodeHex(byte[] bytes) { StringBuffer buf = new StringBuffer(bytes.length * 2...
2011-04-29 12:54:40 173
原创 使用泛型和没使用泛型的区别
使用泛型的类/** * 使用泛型的类 * @author chase * * @param <T> */class Gen<T> { private T ob; //定义泛型的成员变量 public Gen(T ob) { this.ob = ob; } public T getOb() { retur...
2011-04-29 12:52:37 141
原创 冒泡排序
public class MaoPao { /** * @param args * @author chase * 冒泡排序 从小到大 */ public static void main(String[] args) { int i,j; int intArray[]={10,5,85,40,20,78,66}; int l=intAr...
2011-04-29 12:48:33 95
原创 正则表达式抓取网页的所有邮箱链接
import java.io.BufferedReader;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.IOException;import java.util.regex.Matcher;import java.util.regex.Pattern;/** ...
2011-04-29 12:43:28 157
原创 Tomcat改端口
<?xml version='1.0' encoding='utf-8'?><!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with ...
2011-04-29 12:40:35 119
原创 设置Tomcat的编码
<Connector port="8088" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding='UTF-8'/>再Tomcat的安装目录下(apache-tomcat...
2011-04-29 12:38:27 132
原创 世界编程大赛第一名编写的程序
e100 33 f6 bf 0 20 b5 10 f3 a5 8c c8 5 0 2 50 68 13 1 cb e 1f be a1 1 bf 0 1 e11b 6 57 b8 11 1 bb 21 13 89 7 4b 4b 48 79 f9 ad 86 e0 8b c8 bd ff ff e8 20 e134 0 3d 0 1 74 1a 7f 3 aa eb f3 2d ff 0 ...
2011-04-29 09:24:53 178
原创 泛型方法实例
/** * * @author chase * 2011-04-26 * 泛型方法实例 * */public class ExampleA { public <T> void f(T x) { System.out.println(x.getClass().getName()); } public static void m...
2011-04-29 09:01:32 168
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人