java ·ÃÎÊaccess
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class LinkAccess {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Connection con=null;
Statement stmt=null;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=E://test//jdbc.mdb";
// "jdbc:odbc:driver={Microsoft Access Driver(*.mdb)};DBQ=D://test//jdbc.mdb";
// ÉÙÒ»¸ö¿Õ¸ñ¶¼²»ÐС£¡£¡£
con = DriverManager.getConnection(url,"sa","");
stmt = con.createStatement();
String query = "select * from user";
ResultSet rs = stmt.executeQuery(query);
while(rs.next())
{
System.out.println("connection is ok.");
System.out.println(rs.getInt("id"));
&
Ïà¹ØÎĵµ£º
/**
* Copyright (c) 2010 IBOBO Corporation. All Rights Reserved.
*/
package com.ibm.util.dao.hib;
/**
* [Java Generics] get T.Class from <T>
*
* @author <a ......
eclipseÑ¡Ò»¸ö±äÁ¿ºó£¬Õâ¸öÀàÀïµÄ¸Ã±äÁ¿²»±äÉ«ÎÊÌâ½â¾ö£º
alt + shift + o
/**
* дÈëÈÕÖ¾
* filePath ÈÕÖ¾ÎļþµÄ·¾¶
* code ҪдÈëÈÕÖ¾ÎļþµÄÄÚÈÝ
*/
public
static
boolean
print(String filePath,String code) {
try
{
File tofile
=
new
File(filePath);
......
½ñÌìѧϰÁËapplet²¼¾ÖÎÊÌ⣺
°´Å¥¡¢±êÇ©ÊÇÔõÑù¼ÓÈëµ½applet³ÌÐò(ÈÝÆ÷)µ±ÖÐÈ¥µÄÄØ£¿
ÐèÒªÓõ½²¼¾ÖÈÝÆ÷¹ÜÀíÆ÷(LayoutManager)£ºËüÓÃÓÚÐÖúÈÝÆ÷È·¶¨¼ÓÈëµÄ×é¼þ(°´Å¥µÈ)Ó¦¸Ã·ÅÖõÄλÖÃ
awtÌṩÁË4Öг£ÓõIJ¼¾ÖÈÝÆ÷¹ÜÀíÆ÷
>>FlowLayout
>>BorderLayout
>>GridLayout
>>CardLayout
appletĬÈÏÊ¹Ó ......
JavaÓïÑÔµÄ26¸öϸ½Ú[תÔØ]
Java×÷ΪһÃÅÓÅÐãµÄÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆÓïÑÔ,ÕýÔÚ±»Ô½À´Ô½¶àµÄÈËʹÓᣱ¾ÎÄÊÔͼÁгö×÷ÕßÔÚʵ¼Ê¿ª·¢ÖÐÅöµ½µÄһЩJavaÓïÑÔµÄÈÝÒ×±»È˺öÊÓµÄϸ½Ú,Ï£ÍûÄܸøÕýÔÚѧϰJavaÓïÑÔµÄÈËÓÐËù°ïÖú¡£
1£¬Î»ÒÆÔËËãÔ½½çÔõô´¦Àí
¿¼²ìÏÂÃæµÄ´úÂëÊä³ö½á¹ûÊǶàÉÙ?
int a=5;
......