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

java¸ñʽ»¯ÈÕÆÚʱ¼äµÄº¯Êý

Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyÄêMMÔÂddÈÕ HH:mm:ss");
System.out.println(sdf.format(date));
SimpleDateFormat sdf2 = new SimpleDateFormat("MM");
System.out.println(sdf2.format(date));
Calendar c = Calendar.getInstance();
System.out.println(c.get(Calendar.MONTH)+1);
Date d=new Date(2010,5,12,13,24,30);
c.setTime(d);
System.out.println(c.get(Calendar.MONTH)+1);
--------------------------------------------------------------------
test=new JdbcTest();
  String sql="{call proc_select3(?)};"; //µ÷ÓÃÓï¾ä
  try {
   CallableStatement proc=test.getConnection().prepareCall(sql);
   proc.setString(1, "ÄÐ");
   //proc.execute();
      ResultSet rs= proc.executeQuery();
      while(rs.next())
      {
       System.out.print("id: "+rs.getInt("id"));
    System.out.print(" userName :"+rs.getString("username"));
    System.out.print(" age :"+rs.getInt("age"));
    System.out.println(" sex :"+rs.getString("sex"));
    Timestamp time=rs.getTimestamp("birthday");
    SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    System.out.println(">>>>>>>>>>>>>>>>>>"+sdf.format(time));
    System.out.println(" birthday :"+rs.getDate("birthday"));
      }
   
   
  } catch (SQLException e) {
   // TODO ×Ô¶¯Éú³É catch ¿é
   e.printStackTrace();
  }


Ïà¹ØÎĵµ£º

´«ÖDz¥¿ÍJavaÅàѵ Servlet

ÔçÉÏÆð´²ÓеãÍíÁË£¬µ½Ñ§Ð£µÃʱºò¶¼8£º50ÁË£¬Ò»½ø½ÌÊÒ¿´¼ûÕÅТÏéÀÏʦÔÚ½ÌÊÒÀï¸øͬѧÃǽâ¾öÎÊÌ⣬²»¼ûÁËÀϱϵÄÉíÓ°£¬»¹ÒÔΪ×ß´í½ÌÊÒÁËÄØ£¬°´Àí˵Õâ¸öʱºòÀϱÏÓ¦¸ÃÔçÀ´Á˲ÅÊÇ£¬Ò»ÎʲÅÖªµÀÊDZÏÀÏʦ²¡ÁË,È¥Ò½Ôº¼ì²éÈ¥ÁË£¬Ï£Íû±ÏÀÏʦÄÜÔçµãºÃÆðÀ´£¡
½ñÌìÊÇÕÅÀÏʦ¸øÎÒÃÇÉϿΣ¬ÉîÈëÆÊÎöservlet£¬ÔÚûÀ´´«ÖDz¥¿Í֮ǰ¿´¹ý²»ÉÙÒÔÇ°ÕÅÀ ......

Java ClassLoader ·ÖÎö

ÏÈÌùÒ»¶Î
Java
»ù±¾½á¹¹
Java
½á¹¹°üÀ¨Ëĸö²»Í¬¶øÓÖÏà¹ØµÄ²¿·Ö£º
Java
ÓïÑÔ¡¢
class
Îļþ¸ñʽ¡¢Ó¦ÓóÌÐò½Ó
¿Ú¡¢ÐéÄâ»ú
ÆäÖУ¬ÐéÄâ»úµÄÖ÷ÒªÈÎÎñÊÇÔÚ³ÌÐòÔËÐÐÖÐÐèÒªµÄʱºòµ÷ÓÃ
class
Îļþ²¢Ö´ÐÐÆäÖеÄ×Ö½ÚÂë¡£Ò»¸ö
Java
Ó¦
ÓÃÓÐÁ½ÖÖ
class loader
£º
the system class loader
ºÍ
class loader objects ......

Java ÔËËã·û×ܼÆ

1.ËãÊõÔËËã·û
    JavaµÄËãÊõÔËËã·û·ÖΪһԪÔËËã·ûºÍ¶þÔªÔËËã·û¡£Ò»ÔªÔËËã·ûÖ»ÓÐÒ»¸ö²Ù×÷Êý£»¶þÔªÔËËã·ûÓÐÁ½¸ö²Ù×÷Êý£¬ÔËËã·ûλÓÚÁ½¸ö²Ù×÷ÊýÖ®¼ä¡£ËãÊõÔËËã·ûµÄ²Ù×÷Êý±ØÐëÊÇÊýÖµÀàÐÍ¡£
    (1)Ò»ÔªÔËËã·û£º
    Ò»ÔªÔËËã·ûÓУºÕý£¨+£©¡¢¸º£¨£­£©¡¢¼Ó1£¨++£©ºÍ¼õ1£¨£­£­£ ......

JavaÏß³Ì֪ʶÉîÈë½âÎö(1)

Ò»°ãÀ´Ëµ,ÎÒÃÇ°ÑÕýÔÚ¼ÆËã»úÖÐÖ´ÐеijÌÐò½Ð×ö"½ø³Ì"(Process) ,¶ø²»½«Æä³ÆΪ³ÌÐò(Program)¡£Ëùν"Ïß³Ì"(Thread),ÊÇ"½ø³Ì"ÖÐij¸öµ¥Ò»Ë³ÐòµÄ¿ØÖÆÁ÷¡£ÐÂÐ˵IJÙ×÷ϵͳ,ÈçMac,Windows NT,Windows 95µÈ,´ó¶à²ÉÓöàÏ̵߳ĸÅÄî,°ÑÏß ³ÌÊÓΪ»ù±¾Ö´Ðе¥Î»¡£Ïß³ÌÒ²ÊÇJavaÖеÄÏ൱ÖØÒªµÄ×é³É²¿·ÖÖ®Ò»¡£
ÉõÖÁ×î¼òµ¥µÄAppletÒ²ÊÇÓɶà¸öÏß ......

java ËõÂÔͼ ʵÏÖ

import  java.awt.image. * ;
import  com.sun.image.codec.jpeg. * ;   
 public class poiReadDoc {
 Image img = null;
 int width = 0,height =0;
 String destFile = "";
 public void readImg(String fileName) throws IOException{
  File _fil ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ