[JAVA] synchronized,Thread,제너릭
# synchronized 실제로 실행해보고 결과 비교해보면 안다. 멀티쓰레드 ======================== class ManyClient{ StringBuffer str=new StringBuffer("ABCDE"); public static void main(String args[]) throws InterruptedException{ ManyClient mc=new ManyClient(); mc.makeThread("가나다라마"); mc.makeThread("abcde"); Thread.sleep(3000); } public void makeThread(final String s){ Thread t=new Thread(){ public void run(){ addStr(s); ..
LANGUAGE/JAVA
2017. 11. 15. 11:09