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

Java ÔÚÏ߸üгÌÐò£¨Í¨¹ýÊý¾Ý¿â»ñÈ¡¸üÐÂÎļþ£©

/*ÏÈ°ÑÏÂÔصÄÎļþ·ÅÔÚUpdateTempÎļþ¼ÐÖУ¬´ýÈ«²¿ÏÂÔغó£¬ÔÙ°Ñ´ËÎļþ¼ÐÖеÄÎļþÒƳöÌæ»»¾ÉÎļþ*/
 
 
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
 
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
 
/*
* Main.java
*
* Created on 2009-7-9, 22:29:27
*/
 
/**
*
* @author Administrator
*/
public class Main extends javax.swing.JFrame {
Connection cn=null;
MSConnection con=new MSConnection();
File file=null;
Vector vtFileName=new Vector();
int Process=0;
 
/** Creates new form Main */
public Main() {
initComponents();
this.setTitle("ÔÚÏ߸üгÌÐò");
this.setVisible(true);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); //µÃµ½ÆÁÄ»µÄ³ß´ç
this.setLocation((screenSize.width)/2-150, (screenSize.height)/2-200);
// try {
// Thread.currentThread().sleep(10000);
// } catch (InterruptedException ex) {
// Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
// }
}
 
 
public void RunProgram(){
// String path=System.getProperty("user.dir"); //»ñȡ·¾¶
try {
String OS = System.getProperty("os.name"); //»ñÈ¡µ±Ç°²Ù×÷ϵͳ£¬Windows or Linux
// String path=System.getProperty("user.dir"); //Ȗ


Ïà¹ØÎĵµ£º

java×ÔѧµãµÎ


String Óë StringBufferÇø±ð:
String×Ö·û´®¶ÔÏóÊDz»¿É±äµÄ£»StringBufferÊDZ䳤ºÍ¿ÉдµÄ¶¯Ì¬×Ö·ûÐòÁУ¬¿ÉÒÔ×Ô¶¯µØÔö¼Ó¿Õ¼ä¡£
Integer var = new Integer();//ÓÐÓï·¨´íÎó
Integer var = new Integer(2);//悦﵀
javaµÄVector³ÉÔ±ÊÇÒªÓÃelementAt(i)³ÉÔ±º¯ÊýÀ´»ñµÃµÄ£¬²»ÄÜÓÃve[i]µÃµ½¡£
Vector::public Enumeration& ......

Java»ù±¾Óï·¨

 finalize·½·¨
ËüÊÇjava.lang.ObjectÀàÖеķ½·¨. ÊÇprotectedµÄ.
ȱʡʱÕâ¸ö·½·¨ÊÇ¿ÕµÄ. JavaÔËÐÐϵͳÔÚÀ¬»ø»ØÊÕʱÔÚ¶ÔÏó±»³·Ïú֮ǰµ÷ÓÃÕâ¸ö·½·¨. µ«ÓÉÓÚÀ¬»øµ¥Ôª
»ØÊÕµÄʱ¼äÊDz»È·¶¨µÄ.ËùÒÔ²»Äܹý·ÖÒÀÀµËü(ÕâºÍc++µÄÎö¹¹º¯Êý²»Í¬). 
¶øÖ»ÄÜÊÇ"ÔÚ¶ÔÏó±»³·Ïú֮ǰ"×öһЩ´¦Àí.ÀýÈç¿ÉÒÔÔÚÕâÀï¹Ø±Õ¹¹Ôì·½·¨Öдò¿ ......

JavaʵÏÖ¶ÓÁвÙ×÷


import java.util.LinkedList;  
//µ¥Ïò¶ÓÁР 
public class Queue {  
    public Queue() {  
    }  
    private LinkedList list = new LinkedList();  
    public void pu ......

Java´Óweb·þÎñÆ÷ÏÂÔØÎļþµ½±¾µØ

/*´Ó·þÎñÆ÷ÖÐÏÂÔØÎļþµ½±¾µØ*/
/*url:Îļþ´æ·ÅÔÚ·þÎñÆ÷µÄµØÖ·£»target:Òª±£´æµÄ·¾¶*/
 
public String DownloadFile(String url,String target){
URLConnection con=null;
URL theUrl=null;
try {
theUrl=new URL(url);//½¨Á¢µØÖ·
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ