Java¶ÔÏó´®Ðл¯ÊµÀý
1.StudentList.java:
/**
*
* @author lucifer
*/
package JavaSerializable;
import java.util.*;
import java.io.*;
public class StudentList implements Serializable{
Vector list = new Vector(6);
public StudentList(){}
public void addStudent(String name){
if(name != null)
list.addElement(name);
}
public void listStudent(){
for(int i = 0;i < list.size();i++){
System.out.println("Student" + i + ":" + (String)list.elementAt( i ) + "<br>");
}
}
}
2.StudentListApplication.java:
/**
*
* @author lucifer
*/
package JavaSerializable;
import java.io.*;
public class StudentListApplication {
public StudentListApplication(){}
public void buildStudentList(StudentList list){
list.addStudent("Bob Robinson");
list.addStudent("Steve Robinson");
list.addStudent("Rob Stevinson");
list.addStudent("Tod Thomson");
list.addStudent("Jack Jones");
list.addStudent("Micheal Jackson");
}
public void putStudentList(StudentList list){
try{
&n
Ïà¹ØÎĵµ£º
ʾÀý´úÂëÈçÏÂ:
//LogProxy.java
package com.gc.action;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
public class LogProxy implements InvocationHandler{
private ......
JavaÔÚÍøÂç±à³ÌÕâ¸öµØ·½×öµÄºÜºÃ£¬javaµÄÖ÷ҪĿµÄÒ²ÊÇΪÁËÍøÂç¶øÉúµÄ£¬ËüÄÜ·½±ãµÄ·ÃÎÊÍøÂçÉϵÄ×ÊÔ´¡£ÎÒÃÇÕâ½Ú¿ÎÀ´½éÉÜÍøÂçͨѶµÄÁ½ÖÖ»úÖÆ£ºURLͨÐÅ»úÖÆ£¬SocketͨÐÅ»úÖÆ¡£
URL±íʾÁËInternetÉÏÒ»¸ö×ÊÔ´µÄÒýÓûòµØÖ·¡£JavaÍøÂçÓ¦ÓóÌÐòÒ²ÊÇʹÓÃURLÀ´¶¨Î»Òª·ÃÎʵÄInternetµÄ×ÊÔ´¡£ÔÚjdkÀïÃæjava.net.URLÒ²ÊÇÒ»¸öÀ࣬Ëü ......
¡¡1¡¢»ù±¾¸ÅÄî¼°ÔÀí
¡¡¡¡ÎÒÃÇÖªµÀ£¬¶ÔÓÚ¹²Ïí×ÊÔ´£¬ÓÐÒ»¸öºÜÖøÃûµÄÉè¼Æģʽ£º×ÊÔ´³Ø(Resource Pool)¡£¸ÃģʽÕýÊÇΪÁ˽â¾ö×ÊÔ´µÄƵ·±·ÖÅä?ÊÍ·ÅËùÔì³ÉµÄÎÊÌ⡣Ϊ½â¾öÉÏÊöÎÊÌ⣬¿ÉÒÔ²ÉÓÃÊý¾Ý¿âÁ¬½Ó³Ø¼¼Êõ¡£Êý¾Ý¿âÁ¬½Ó³ØµÄ»ù±¾Ë¼Ïë¾ÍÊÇΪÊý¾Ý¿âÁ¬½Ó½¨Á¢Ò»¸ö“»º³å³Ø”¡£Ô¤ÏÈÔÚ»º³å³ØÖзÅÈëÒ»¶¨ÊýÁ¿µÄÁ¬½Ó£¬µ±Ð ......
1.ʵÏÖÎı¾ÔĶÁ
package AllAboutFile;
/**
*
* @author lucifer
*/
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class FileViewer extends Frame implements ActionListener{
String directory;
Text ......