java¶ÁÈ¡mysqlÊý¾Ý¿âlatin1±ÜÃâÂÒÂë·½·¨
дÈëʱ£¬ÏÈ×öencode£º
public static String encode(String src) {
String result = null;
try {
result = new String(src.getBytes("gbk"), "ISO-8859-1");
} catch (UnsupportedEncodingException uee) {
System.err.println(uee);
}
return result;
}
¶Á³öʱ£¬ÔÙ×ödecode£º
public static String decode(String src) {
String result = null;
try {
result = new String(src.getBytes("ISO-8859-1"), "gbk");
} catch (UnsupportedEncodingException uee) {
System.err.println(uee);
}
return result;
}
Á¬½Óʱ²»ÐèÒªÖ¸¶¨×Ö·û¼¯
Ïà¹ØÎĵµ£º
ListµÄÓ÷¨
List°üÀ¨List½Ó¿ÚÒÔ¼°List½Ó¿ÚµÄËùÓÐʵÏÖÀà¡£ÒòΪList½Ó¿ÚʵÏÖÁËCollection½Ó¿Ú£¬ËùÒÔList½Ó¿ÚÓµÓÐCollection½Ó¿ÚÌṩµÄËùÓг£Ó÷½·¨£¬ÓÖÒòΪListÊÇÁбíÀàÐÍ£¬ËùÒÔList½Ó¿Ú»¹ÌṩÁËһЩÊʺÏÓÚ×ÔÉíµÄ³£Ó÷½·¨£¬Èç±í1Ëùʾ¡£
±í1 List½Ó¿Ú¶¨ÒåµÄ³£Ó÷½·¨¼°¹¦ÄÜ
´Ó±í1¿ÉÒÔ¿´³ö£¬List½Ó¿ÚÌṩµÄÊʺÏÓÚ×ÔÉíµÄ ......
package com.citycollege.stw;
public class testreplace {
public static final String replace( String line, String oldString, String newString )
{
if (line == null)
{
return null ......
Õâ¶Îʱ¼äΪ¹«Ë¾ÄÚ²¿µÄÊý¾Ý´¦Àí¿ª·¢ÁËÒ»¸ö¹¤¾ß£¬Ç£Éæµ½ÔÚOracleÖм¯³ÉjavaÓ¦Óã¬×ܽáÁËһЩ¾Ñ飬ÒÔ¹©´ó¼Ò²Î¿¼ÁË£¡
³ÌÐò·ÖÁ½²¿·Ö£¬Ç°¶Ë½çÃæÓÉVB/VC¿ª·¢£¬Ö÷ҪʵÏÖÊý¾Ý´¦ÀíÅäÖü°³£¹æ¼Ç¼ÔËË㣬Õⲿ·ÖûÓÐʲôºÃ˵µÄÁË¡£
ºǫ́ÒÔOracleΪÊý¾Ý»ù´¡´¦ÀíÍÐ¹ÜÆ½Ì¨£¬ÔÚÊý¾Ý´¦Àí¹ý³ÌÖУ¬ÐèÒª¶ÔһЩÃû³Æ¡¢µØÖ·Ê²Ã´µÄ½øÐÐÕªÒªÌáÈ¡¡¢² ......
MySQL Á·Ï°ÊÖ¸å
MySQL ½éÉÜ
MySQL ABÊÇÓÉMySQL´´Ê¼È˺ÍÖ÷Òª¿ª·¢ÈË´´°ìµÄ¹«Ë¾¡£MySQL AB×î³õÊÇÓÉDavid Axmark¡¢Allan
LarssonºÍMichael“Monty
”WideniusÔÚÈðµä´´°ìµÄ¡£
¹«Ë¾ÃûÖеēAB”ÊÇÈðµäÓ ......
/*ÑÝʾһ¸öJDBC³ÌÐò£¬´ÓMysqlµÄLMDÊý¾Ý¿âÖжÁ³ö±íadminµÄÒ»¸öÐÅÏ¢*/
import java.sql.*;
public class TestMysqlConnection {
public static void main(String[] args) {
Connection conn = null;
Statement stmt = ......