java 时间格式化
import java.text.SimpleDateFormat;
Date date=new Date();
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String time=format.format(date);
java.sql.Time now=new java.sql.Time(System.CurrentTimeMillis());
输出短的系统时间 18:34:44
相关文档:
遇到一个java编程面试题,当时没有写出来,回来仔细想了想,写出答案,一共以后参考!
要求:将字符串"I am a good student."转换成"student. good a am I"
java代码为:
public class Application
{
private String s;
public void setS(String s)
{
s=s;
}
public S ......
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 将汉字转化为全拼
*/
public class CnToSpell {
private static Map<String, Integer> spellMap = null;
// 存放生僻字和其拼音的Map
private static Map<Characte ......
JAVA读XML:sax,dom,jdom,dom4j的比较以及选择(转)
原文:www.hicourt.gov.cn/homepage/show9_content.asp
SAX: ......
package protest;
import java.sql.*;
/**
create proc proc_select
@lname varchar(20),
@address varchar(20) output
as
&n ......
char[] cha = operator.toCharArray();
char ch = cha[0];
double sum = 0;
switch (ch) {
&nb ......