java cstÊ±Çø×ª»»
BODY { color: #000000; font-size: 9pt; font-family: ËÎÌå }
TABLE { font-size: 9pt; font-family: ËÎÌå }
SimpleDateFormat sdfy = new SimpleDateFormat("HH:mm");
String tt =
"Tue Feb 09 10:43:00 CST 2010";
sdf = new SimpleDateFormat(
"EEE MMM dd HH:mm:ss 'CST' yyyy", Locale.US);
try
{
System.out.println(sdfy.format(sdf.parse(tt)));
} catch
(ParseException e1) {
// TODO ×Ô¶¯Éú³É catch
¿é
e1.printStackTrace();
}
Ïà¹ØÎĵµ£º
/**
* ÏÂÔØÎļþ
* @param filePath --ÎļþÍêÕû·¾¶
* @param response --HttpServletResponse¶ÔÏó
*/
public static void downloadFile(
String filePath,
javax.servlet.http.HttpServletResponse response) {
String fileName = ""; //ÎļþÃû£¬Êä³öµ½Óû§µÄÏÂÔØ¶Ô»°¿ò
//´ÓÎļþÍêÕû·¾¶ÖÐÌáÈ¡ÎļþÃû£¬²¢½øÐбà ......
µ±Java³ÌÐò´´½¨Ò»¸öÀàµÄʵÀý»òÕßÊý×éʱ£¬¶¼ÔÚ¶ÑÖÐΪеĶÔÏó·ÖÅäÄÚ´æ¡£ÐéÄâ»úÖÐÖ»ÓÐÒ»¸ö¶Ñ£¬ËùÓеÄÏ̶߳¼¹²ÏíËü¡£
1¡¢À¬»øÊÕ¼¯£¨Garbage Collection£©
À¬»øÊÕ¼¯ÊÇÊÍ·ÅûÓб»ÒýÓõĶÔÏóµÄÖ÷Òª·½·¨¡£ËüÒ²¿ÉÄÜ»áΪÁ˼õÉٶѵÄË鯬£¬¶øÒƶ¯¶ÔÏó¡£ ......
ʹÓÃÀàjava.io.File
1.»ñȡϵͳӲÅÌÐÅÏ¢£º
public static String getDiskInfo() {
StringBuffer sb=new StringBuffer();
File[] roots = File.listRoots();// »ñÈ¡´ÅÅÌ·ÖÇøÁбí
for (File file : roots) {
long totalSpace=file.getTotalSpace();
long freeSpace=file.getFreeSpace();
long usa ......
Object Ordering
A List l may be sorted as follows.
Collections.sort(l);
If the List consists of String elements, it will be sorted into alphabetical order. If it consists of Date elements, it will be sorted into chronological order. How does this happen? String and Date both implement the Compara ......
Ò»¡¢Axis°²×° 1¡¢»·¾³ J2SE SDK 1.5 or 1.6: ÎÒʹÓà 1.6 Servlet Container: ÎÒʹÓõÄTomcat 6.0
2¡¢µ½ http://ws.apache.org/Axis/ÍøÕ¾ÏÂÔØAxis°²×°°ü
3¡¢ÏÈÔÚeclipseÏÂн¨web projectΪWebServiceDemo.ÔÚTomcatµÄÅäÖÃxmlÅäÖÃÉÏ£º<Context path="/webservice" docBase="D:\workspace\WebServiceDemo\WebRoot"/>. ......