Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java»ù´¡£ºµÚÊ®Áù½² ÈÕÆÚºÍʱ¼äµÄʹÓÃ

ÔÚJavaÓ¦ÓÃÖУ¬ÈÕÆÚºÍʱ¼ä×÷Ϊ»ù±¾µÄÐÅÏ¢ÀàÐÍÓ¦ÓõÄÌØ±ð¹ã·º£¬ÀýÈç»ñÈ¡µ±Ç°Ê±¼ä£¬¼ÆËãijЩ²Ù×÷Ö´ÐеÄʱ¼äµÈ¡£ÈÕÆÚ´¦ÀíÏà¹ØµÄÀà°üÀ¨DateºÍCalendar£¬Í¨¹ýDateºÍCalendar¿ÉÒÔ»ñÈ¡µ±Ç°Ê±¼ä£¬¶Ôʱ¼ä½øÐÐһЩÔËË㣬»ñȡʱ¼äÖеÄÄê¡¢Ô¡¢ÈÕ¡¢Ê±¡¢·Ö¡¢ÃëºÍÐÇÆÚµÈÐÅÏ¢¡£ÔÚÊäÈëºÍÊä³öµÄʱºò¾­³£Óõ½×Ö·û´®ÐÎʽµÄʱ¼ä£¬Õâ¾ÍÐèҪʱ¼äºÍ×Ö·û´®Ö®¼äµÄÏ໥ת»»£¬ÏµÍ³ÌṩÁËDateFormatºÍSimpleDateFormatÀ´Íê³ÉÕâ¸öת»»¡£
java.util.DateÀà
ÓÃÓÚ±íʾÈÕÆÚºÍʱ¼ä£¬Òª»ñÈ¡µ±Ç°Ê±¼ä£¬¿ÉÒÔʹÓÃÏÂÃæµÄ´úÂ룺
¡¾Àý¡¿
// SimpleDateTest.java
 
import java.util.Date;
 
public class SimpleDateTest {
 public static void main(String[] args) {
      // ¶¨Òåʱ¼ä¶ÔÏó  
          Date d = new Date();
      // °´ÕÕĬÈϸñʽÊä³öʱ¼ä
      System.out.println(d.toString());  
 }
}
ÏÂÃæÊÇÊä³öµÄ½á¹û£º
Mon Dec 11 05:32:13 GMT 2006
Èç¹ûÏë°´ÕÕÌØ¶¨µÄ¸ñʽ½øÐÐÊä³ö£¬¿ÉÒÔ°´ÕÕÏÂÃæµÄ·½·¨Íê³É£¬µ«ÊÇÏÖÔڵİ汾Öн¨Ò鲻ҪʹÓá£
¡¾Àý¡¿
// SimpleDate2Test.java
 
import java.util.Date;
 
public class SimpleDate2Test {
 public static void main(String[] args) {
      // ¶¨Òåʱ¼ä¶ÔÏó  
          Date d = new Date();
      // »ñÈ¡Äê
          int year = d.getYear()+1900;
      // »ñÈ¡ÔÂ
          int month = d.getMonth()+1;
      // »ñÈ¡ÈÕ
          int date = d.getDate();
      // »ñȡʱ
          int hour = d.getHours();
      // »ñÈ¡·Ö
          int minute = d.getMinutes();
      // »ñÈ¡Ãë
          i


Ïà¹ØÎĵµ£º

Java Reflect ·´Éä ѧϰ±Ê¼Ç3 ²Ù×÷

       Java Reflect±àд ͨÓÃÊý×éÀ©Õ¹Àà
 
package com.accp.array;

import java.lang.reflect.Array;

public class GrowArrayTest {
public static void main(String[] args) {
Integer[] array = {1,2,3,4}; //ͨÓÃÀ©Õ¹
arrayPrint(arra ......

java Ḭ̈߳²È«

Servlet/JSP¼¼ÊõºÍASP¡¢PHPµÈÏà±È£¬ÓÉÓÚÆä¶àÏß³ÌÔËÐжø¾ßÓкܸߵÄÖ´ÐÐЧÂÊ¡£ÓÉÓÚServlet/JSPĬÈÏÊÇÒÔ¶àÏß³ÌģʽִÐеģ¬ËùÒÔ£¬ÔÚ±àд´úÂëʱÐèÒª·Ç³£Ï¸Öµؿ¼ÂǶàÏ̵߳ݲȫÐÔÎÊÌ⡣Ȼ¶ø£¬ºÜ¶àÈ˱àдServlet/JSP³ÌÐòʱ²¢Ã»ÓÐ×¢Òâµ½¶àḬ̈߳²È«ÐÔµÄÎÊÌ⣬ÕâÍùÍùÔì³É±àдµÄ³ÌÐòÔÚÉÙÁ¿Óû§·ÃÎÊʱûÓÐÈκÎÎÊÌ⣬¶øÔÚ²¢·¢Óû§ÉÏÉýµ ......

JavaÀíÂÛÓëʵ¼ù: Ãè»æḬ̈߳²È«ÐÔ

Java ÀíÂÛÓëʵ¼ù: Ãè»æḬ̈߳²È«ÐÔ
2007-12-15 00:10
——Ḭ̈߳²È«²»ÊÇÒ»¸ö·ÇÕæ¼´¼ÙµÄÃüÌâ
Brian Goetz (brian@quiotix.com), Ê×ϯ¹ËÎÊ, Quiotix Corp
2003 Äê 11 ÔÂ 15 ÈÕ
7Ô·ÝÎÒÃǵIJ¢·¢×¨¼Ò Brian Goetz ½« Hashtable ºÍ Vector ÀàÃèÊöΪ“ÓÐÌõ¼þḬ̈߳²È«µÄ”¡£Ò»¸öÀàÄѵÀ²»ÊÇḬ̈߳²È«¾ÍÊÇÏß³Ì ......

javaÖÐʹ´°¿Ú¾ÓÖÐÏÔʾ

Èç¹ûҪʹÖ÷´°¿Ú ¾ÓÖÐÒ»°ãʹÓÃÏÂÃæµÄ·½·¨£º
import javax.swing.*;
import java.awt.*;
public class ToCenter
{
  public ToCenter(JFrame frame)
   {
       //---------------------------ÉèÖô°¿Ú¾ÓÖÐ---------------------------------------------------- ......

(ת)Java³ÌÐòÔ±µ½¼Ü¹¹Ê¦µÄÍÆ¼öÔĶÁÊé¼®

×÷ΪJava³ÌÐòÔ±À´Ëµ£¬×îÍ´¿àµÄÊÂÇéιýÓÚ¿ÉÒÔÑ¡ÔñµÄ·¶Î§Ì«¹ã£¬¿ÉÒÔ¶ÁµÄÊéÌ«¶à£¬ÍùÍùÈÝÒ×ÎÞËùÊÊ´Ó¡£ÎÒÏë¾ÍÎÒ×Ô¼º¶Á¹ýµÄ¼¼ÊõÊé¼®ÖÐÌôÑ¡³öÀ´Ò»Ð©£¬°´ÕÕѧϰµÄÏȺó˳Ðò£¬ÍƼö¸ø´ó¼Ò£¬ÌرðÊÇÄÇЩÏë²»¶ÏÌá¸ß×Ô¼º¼¼ÊõˮƽµÄJava³ÌÐòÔ±ÃÇ¡£
Ò»¡¢Java±à³ÌÈëÃÅÀà
¶ÔÓÚûÓÐJava±à³Ì¾­ÑéµÄ³ÌÐòÔ±ÒªÈëÃÅ£¬Ëæ±ã¶ÁʲôÈëÃÅÊé¼®¶¼Ò»Ñù£¬Õâ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ