java´úÂëÁ¬½Óµ½oracleÊý¾Ý¿â
package com.deng.oracle;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class TestOracle {
public static void main(String[] args) {
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
//System.out.println("ÓÐÊý¾Ý¿âÇý¶¯");
String url = "jdbc:oracle:thin:@127.0.0.1:1521:orcl";
Connection conn;
try {
conn = DriverManager.getConnection(url, "scott", "tiger");
Statement stmt = conn.createStatement();
String sql = "select * from emp";
ResultSet rs = stmt.executeQuery(sql);
while (rs.next()) {
System.out.println("ENAME: " + rs.getString(2));
}
} catch (SQLException e) {
e.printStackTrace();
}
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
Ê×ÏÈ, ÔÚclasspath»·¾³±äÁ¿Ï¼ÓÔØoracleµÄÊý¾Ý¿âÇý¶¯: classes12.jar»òÕßÊÇojdbc14.jar, È»ºó¼ÓÔØ¸÷¸öSQLµÄÀà, ±àдurl, Õâ¸öurlÊÇjdbc:oracle:thin:@127.0.0.1:1521:orcl, ÆäÖÐ1521ÊǶ˿ںÅ, orclÊÇÊý¾Ý¿âµÄSID, Õâ¸öSID¿ÉÒÔÔÚ×¢²á±íÖв鿴µÃµ½, cmdà regedit, ÔÚ×¢²á±íÖÐHKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0¼üÖµORACLE_SID¿ÉÒÔ¿´µ½Õâ¸öSID: orcl.
Ïà¹ØÎĵµ£º
ϸ½ÚÉÏÐèÒª¸Ä½ø¡£
import java.util.*;
public class Map {
Vector<int[]> v = new Vector<int[]>();
Vector<Integer> vv = new Vector<Integer>();
Map() {
int[] array = { 1, 2, 3, 4, 5 };
Scanner s = new Scanner(System.in);
int x = s.nextInt();
pro(array, 0, x);
for(int i=0 ......
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.ServletOutpu ......
import java.util.regex.*;
public final class RegExpValidator
{
/**
* ÑéÖ¤ÓÊÏä
* @param ´ýÑéÖ¤µÄ×Ö·û´®   ......
Ò»¡¢±³¾°
1¡¢µ±ÎÒÃǵÚÒ»´Î½Ó´¥Ä³¶Î´úÂ룬µ«ÓÖ±»ÒªÇóÔÚ¼«¶ÌµÄʱ¼äÄÚÓÐЧµØ·ÖÎöÕâ¶Î´úÂ룬ÎÒÃÇÐèҪʲôÑùµÄ×¢ÊÍÐÅÏ¢£¿
2¡¢ÔõôÑù±ÜÃâÎÒÃǵÄ×¢ÊÍÈß³¤¶øÇÒÁèÂÒ²»¿°ÄØ£¿
3¡¢ÔÚ¶àÈËÐͬ¿ª·¢¡¢Î¬»¤µÄ½ñÌ죬ÎÒÃÇÐèÒªÔõôÑùµÄ×¢ÊÍÀ´±£Ö¤¸ßÖÊ¡¢¸ß½»µÄ½øÐпª·¢ºÍά»¤¹¤×÷ÄØ£¿
¶þ¡¢ÒâÒå
³ÌÐòÖеÄ×¢ÊÍÊdzÌÐòÉè¼ÆÕßÓë³ÌÐòÔĶÁÕß ......
JavaÓïÑÔµÄÊäÈëÊä³ö¹¦ÄÜÊÇÊ®·ÖÇ¿´ó¶øÁé»îµÄ£¬ÃÀÖв»×ãµÄÊÇ¿´ÉÏÈ¥ÊäÈëÊä³öµÄ´úÂë²¢²»ÊǺܼò½à£¬ÒòΪÄãÍùÍùÐèÒª°ü×°Ðí¶à²»Í¬µÄ¶ÔÏó¡£ÔÚJavaÀà¿âÖУ¬IO²¿·ÖµÄÄÚÈÝÊǺÜÅÓ´óµÄ£¬ÒòΪËüÉæ¼°µÄÁìÓòºÜ¹ã·º:±ê×¼ÊäÈëÊä³ö£¬ÎļþµÄ²Ù×÷£¬ÍøÂçÉϵÄÊý¾ÝÁ÷£¬×Ö·û´®Á÷£¬¶ÔÏóÁ÷£¬zipÎļþÁ÷....±¾ÎĵÄÄ¿µÄÊÇΪ´ó¼Ò×öÒ»¸ö¼òÒªµÄ½éÉÜ¡£
¡¡¡¡Á ......