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

java jdbc Á¬½ÓOracle9i

     ×Ô¼ºÔÚ×öÕâ¸ö³ÌÐòµÄʱºò¿´¹ýºÜ¶àµÄ×ÊÁÏ£¬ÉÏÍøÒ²²éÁ˲»ÉÙµÄ×ÊÁÏ£¬¿ÉÊǶà°ë˵µÄÊdzöÉñÈ뻯£¬ÔÆÀïÎíÀï...²»¹â¿´Á˲»Ã÷°×£¬¶øÇÒÊÇÓÐÃ÷°×Ò»µãµÄÈË£¬¿´ÁËÒ²±äµÄÓÐЩģºýÁË¡£
     ÕâÀïÎÒÑÚÊÎÒ»Ì×ÍêÕûµÄjava jdbc Á¬½ÓOracle9iµÄ·¶Àý¡£
package com.lxh.dbcon;//´ò°ü
import java.sql.*;//µ¼Èësql°ü
public class DbCon {//¶¨ÒåÁ¬½ÓÀà
 private final String DRIVER="oracle.jdbc.driver.OracleDriver";//OracleµÄÇý¶¯
 private final String URL="jdbc:oracle:thin:@localhost:1521:Oracle9i";//Oracle9iΪOracleµÄÖ÷»ú´®Ãû£¨Ò²¾ÍÊÇOracleµÄSID£©ÔÚ×°OracleµÄʱºòÌîдµÄSID
 private final String DBUSER="scott";//ÕâÀï¾ÍÒÔscott/tigerΪÓû§µÇ¼
 private final String DBPASSWORD="tiger";
 private Connection con=null;//Ô¤Ïȶ¨ÒåÒ»¸öÁ¬½Ó½Ó¿Ú
 
 public DbCon() {//ÔÚ¹¹Ôì·½·¨ÖмÓÔØÊý¾Ý¿âÇý¶¯
  try{
   Class.forName(DRIVER).newInstance();
  }catch(Exception e){
   e.printStackTrace();
  }
 }
 public Connection getConnection(){ //Á¬½ÓÊý¾Ý¿âµÄ·½·¨
  try{
   con=DriverManager.getConnection(URL,DBUSER,DBPASSWORD);
  }catch(Exception ew){
   ew.printStackTrace();
  }
  
  return con;
 }
}
ÕâÊÇÒ»¸öÍêÕûµÄÁ¬½ÓÀ࣬²âÊÔÒѾ­Í¨¹ý¡£


Ïà¹ØÎĵµ£º

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


ÓÐÁ½ÖÖ·½·¨£º
·½·¨Ò»£ºÓÃjava.util.DateÀàÀ´ÊµÏÖ£¬²¢½áºÏjava.text.DateFormatÀàÀ´ÊµÏÖʱ¼äµÄ¸ñʽ»¯£¬¿´ÏÂÃæ´úÂ룺
import java.util.*;
import java.text.*;
//ÒÔÏÂĬÈÏʱ¼äÈÕÆÚÏÔʾ·½Ê½¶¼ÊǺºÓïÓïÑÔ·½Ê½
//Ò»°ãÓïÑÔ¾ÍĬÈϺºÓï¾Í¿ÉÒÔÁË£¬Ê±¼äÈÕÆڵĸñʽĬÈÏΪMEDIUM·ç¸ñ£¬±ÈÈ磺2008-6-16 20:54:53
//ÒÔÏÂÏÔʾµÄÈ ......

javaÖкº×ÖתƴÒô

´úÂëÈçÏ£º
¡¡¡¡ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
¡¡¡¡package com.example.pinyin.demo2;
¡¡¡¡import net.sourceforge.pinyin4j.PinyinHelper;
¡¡¡¡import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
¡¡¡¡import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
¡¡¡¡import net.sourceforge.pinyin4j.form ......

Java Éè¼Æģʽ(12)

Observer
Intent
Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
How to
Subject
  
knows its observers. Any number of Observer objects may observe a subject.
  
provides an in ......

ÎÒºÍJavaµÄһЩÍùÊÂ

     ´ó¼ÒÖªµÀ£¬ÔÚ1991Ä꣬¼¸ºõÓëLinuxͬʱ£¬SUN·¢²¼ÁËJava±à³ÌÓïÑÔ¡£²»¾Ã£¬ÎҵĴóѧͬѧ£¨±ÈÎÒµÍÁ½Ä꣩Íõ¿Ëºê½ÌÊÚ£¨Ç廪²©Ê¿µ¼Ê¦£©ÓëSUNºÏ×÷³ÉÁ¢ÁËÖйú×îÔçµÄ“JavaÑо¿ÖÐÐÄ”£¬²¢ÇÒµ£ÈθÃÖÐÐÄÖ÷ÈΡ£´Ó´Ë£¬ÎÒ¿ªÊ¼×¢ÒâJava¼¼ÊõµÄ·¢Õ¹¶¯Ì¬¡£ÎÒ¼ÒÖеĴæÊ飬ÒÔJavaÊé¼®×î¶à£¨µ±È»£¬³ýÁËÊýѧÊé¼® ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ