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

java»ñÈ¡µ±Ç°Ê±¼ä£¨×ªÔØ£©


ÓÐÁ½ÖÖ·½·¨£º
·½·¨Ò»£ºÓÃjava.util.DateÀàÀ´ÊµÏÖ£¬²¢½áºÏjava.text.DateFormatÀàÀ´ÊµÏÖʱ¼äµÄ¸ñʽ»¯£¬¿´ÏÂÃæ´úÂ룺
import java.util.*;
import java.text.*;
//ÒÔÏÂĬÈÏʱ¼äÈÕÆÚÏÔʾ·½Ê½¶¼ÊǺºÓïÓïÑÔ·½Ê½
//Ò»°ãÓïÑÔ¾ÍĬÈϺºÓï¾Í¿ÉÒÔÁË£¬Ê±¼äÈÕÆڵĸñʽĬÈÏΪMEDIUM·ç¸ñ£¬±ÈÈ磺2008-6-16 20:54:53
//ÒÔÏÂÏÔʾµÄÈÕÆÚʱ¼ä¶¼ÊÇÔÙDateÀàµÄ»ù´¡ÉϵÄÀ´µÄ£¬»¹¿ÉÒÔÀûÓÃCalendarÀàÀ´ÊµÏÖ¼ûÀàTestDate2.java
public class TestDate {
   public static void main(String[] args) {
      Date now = new Date(System.currentTimeMillis());
      Calendar cal = Calendar.getInstance();
     
      DateFormat d1 = DateFormat.getDateInstance(); //ĬÈÏÓïÑÔ£¨ººÓϵÄĬÈÏ·ç¸ñ£¨MEDIUM·ç¸ñ£¬±ÈÈ磺2008-6-16 20:54:53£©
      String str1 = d1.format(now);
      DateFormat d2 = DateFormat.getDateTimeInstance();
      String str2 = d2.format(now);
      DateFormat d3 = DateFormat.getTimeInstance();
      String str3 = d3.format(now);
      DateFormat d4 = DateFormat.getInstance(); //ʹÓÃSHORT·ç¸ñÏÔʾÈÕÆÚºÍʱ¼ä
      String str4 = d4.format(now);
      DateFormat d5 = DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL); //ÏÔʾÈÕÆÚ£¬ÖÜ£¬Ê±¼ä£¨¾«È·µ½Ã룩
      String str5 = d5.format(now);
      DateFormat d6 = DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG); //ÏÔʾÈÕÆÚ¡£Ê±¼ä£¨¾«È·µ½Ã룩
      String str6 = d6.format(now);
      DateFormat d7 = DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT); //ÏÔʾÈÕÆÚ£¬Ê±¼ä£¨¾«È·µ½·Ö£©
      String str7 = d7.format(now);
      DateFormat d8 = D


Ïà¹ØÎĵµ£º

java»·¾³±äÁ¿ÉèÖÃ

java»·¾³±äÁ¿ÅäÖÃ
windows xpÏÂÅäÖÃJDK»·¾³±äÁ¿£º
      1.°²×°JDK£¬°²×°¹ý³ÌÖпÉÒÔ×Ô¶¨Ò尲װĿ¼µÈÐÅÏ¢£¬ÀýÈçÎÒÃÇÑ¡Ôñ°²×°Ä¿Â¼ÎªD:\java\jdk1.5.0_08£»
¡¡ 2.°²×°Íê³Éºó£¬ÓÒ»÷“ÎҵĵçÄÔ”£¬µã»÷“ÊôÐÔ”£»
      3.Ñ¡Ôñ“¸ß¼¶”Ñ ......

JavaÖеÄÖµ´«µÝÓëÒýÓô«µÝ


Ò».Á½¸ö¸ÅÄî
ʵ¼Ê²ÎÊý(ʵ²Î):·½·¨µ÷ÓÃʱ±»´«ÈëµÄ²ÎÊý
ÐβÎ:·½·¨¶¨ÒåʱÉùÃ÷µÄ²ÎÊý
¶þ.ÈýÖÖ´«µÝ·½Ê½
1.»ù±¾Êý¾ÝÀàÐ͵ÄÖµ´«µÝ:
public static void main(String []args)
 {
  int i=10,j=5;
  tValue(i,j);
  System.out.println("i:"+i+"j:"+j);//´òÓ¡½á¹û:i=10,j=5
 } ......

JavaºÍC++λÔËËã¶Ô±È

ΪÁËʵÏÖÁ½¸öÊý×Ö½øÐн»»»£¬ÎÒÃÇͨ³£¿ÉÒÔÀûÓÃλÔËËãÀ´ÊµÏÖ
C++³ÌÐò     swap(int a  ,int b){a^=b^=a^=b;}
JAVA³ÌÐò    swap(int a, int b){  a^=b;b^=a;a^=b; }»òÕß{ b^=(a^=b) ; a^=b;}
Èç¹ûJAVAÓÃC++µÄʵÏÖ·½Ê½Ôò»áµÃµ½ bµÃµ½ÁËaµÄÖµ£¬µ«ÊÇaÏÖÔÚµÄֵȴ² ......

JavaÖ®´Ójar°üÖжÁÈ¡ÅäÖÃÎļþµÄÐÅÏ¢

Java¿ª·¢ÖУ¬×îÖյijÌÐò·¢²¼Ò»°ãÊÇÒª´ò³Éjar°üÐÎʽµÄ£¬¶øÓÐһЩÅäÖÃÎļþÊÇ·ÅÔÚjarÀïÃæµÄ£¬ÕâÑùÔÚ×öFileÐÎʽµÄ¶Áȡʱ£¬¾Í»á·¢ÏÖ¶Á²»µ½ÏàÓ¦µÄÎļþ¡£ÏÂÃæÌṩһÖÖ½â¾ö·½Ê½£ºString fileName = "/config/abcd.config";
InputStream in = getClass().getResourceAsStream(fileName);
BufferedReader br = null;
try{
br = n ......

ÓÃjavaµ÷ÓÃoracle´æ´¢¹ý³Ì×ܽá

ÉùÃ÷£º
ÒÔϵÄÀý×Ó²»Ò»¶¨ÕýÈ·£¬Ö»ÊÇΪÁËÑÝʾ´ó¸ÅµÄÁ÷³Ì¡£
Ò»£ºÎÞ·µ»ØÖµµÄ´æ´¢¹ý³Ì
´æ´¢¹ý³ÌΪ£º
CREATE OR REPLACE PROCEDURE TESTA(PARA1 IN VARCHAR2,PARA2 IN VARCHAR2)  AS
BEGIN
   INSERT INTO HYQ.B_ID (I_ID,I_NAME) VALUES (PARA1, PARA2);
END TESTA;
È»ºóÄØ£¬ÔÚjavaÀïµ÷ÓÃʱ¾ÍÓÃÏÂÃæµÄ´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ