程序设计实用案例选讲(袁卫华)代码1.docVIP

  • 4
  • 0
  • 约1.23万字
  • 约 11页
  • 2017-05-30 发布于浙江
  • 举报

程序设计实用案例选讲(袁卫华)代码1.doc

1. DBTester.java import java.sql.*; import java.io.*; public class DBTester{ public static String strCodeGtoI(String s) throws Exception{ String str=new String(s.getBytes(GB2312),ISO-8859-1); return str; } public static String strCodeItoG(String s) throws Exception{ String str=new String(s.getBytes(ISO-8859-1),GB2312); return str; } public static void main(String[] args) throws Exception{ Connection con; Statement stmt=null; ResultSet rs; Class.forName(com.mysql.jdbc.Driver); String dbUrl=jdbc:mysql://localhost:3306/storedb; String dbUser=dbuser; String dbPwd=1234;

文档评论(0)

1亿VIP精品文档

相关文档