javaµÚ10Ìì´úÂë(Ïß³Ì)
/******************TestThread.java begin****************************/
public class TestThread {
public static void main(String[] args) {
// TODO Auto-generated method stub
Object obj=new Object();
print p=new print(obj);
Thread th=new Thread(p);
th.start();
printNum pn=new printNum(obj);
pn.start();
}
}
class printNum extends Thread{
private Object obj;
public printNum(Object obj){
this.obj=obj;
}
public void run(){
synchronized(obj){
for(int i=1;i<=26;i++){
System.out.println(i*2-1);
System.out.println(i*2);
obj.notifyAll();
try {
obj.wait();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// System.out.println(Thread.currentThread().getName()+":"+i);
}
}
}
}
class print implements Runnable{
private Object obj;
public print(Object obj){
this.obj=obj;
}
public void run(){
synchronized(obj){
for(char i='A';i<='Z';i++){
System.out.println(Thread.currentThread().getName()+":"+i);
obj.notifyAll();
try {
obj.wait();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}
/******************TestThread.java end****************************/
/*********************
Ïà¹ØÎĵµ£º
1.J2EEÊÇʲô£¿
2.½éÉÜJAVAÖеÄCollection FrameWork(°üÀ¨ÈçºÎд×Ô¼ºµÄÊý¾Ý½á¹¹)?
ÈçCOLLECTIONÖÐÒÅÁôÀà(HASHTABLE¡¢VECTOR)ºÍÏÖÓÐÀàµÄÇø±ð£¿(ͬ²½)
3.JavaÖÐÒì³£´¦Àí»úÖÆ£¬Ê¼þ»úÖÆ£¿
¡¡
4.EJBÓëJAVA BEANµÄÇø±ð£¿
EJBÓëJAVA BEANÊÇSUNµÄ²»Í¬×é¼þ ......
1£®ÏÖÔÚÊäÈën¸öÊý×Ö£¬ÒÔ¶ººÅ£¬·Ö¿ª£»È»ºó¿ÉÑ¡ÔñÉý»òÕß½µÐòÅÅÐò£»°´Ìá½»¼ü¾ÍÔÚÁíÒ»Ò³ÃæÏÔʾ°´Ê²Ã´ÅÅÐò£¬½á¹ûΪ£¬Ìṩreset
import java.util.*;
public class bycomma{
public static String[] splitStringByComma(String source){
if(source==null||source.trim().equals(""))
......
ѹËõÎļþ¼Ð´úÂ룺
import java.io.File;
import org.apache.tools.zip.ZipOutputStream; //Õâ¸ö°üÔÚant.jarÀҪµ½¹Ù·½ÍøÏÂÔØ
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipEntry;
......
18.×öÒ»¸öµ¥×ÓģʽµÄÀֻ࣬¼ÓÔØÒ»´ÎÊôÐÔÎļþ
package com.softeem.demo;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
/**
*@authorleno
*µ¥×Óģʽ£¬±£Ö¤ÔÚÕû¸öÓ¦ÓÃÆÚ¼äÖ»¼ÓÔØÒ ......