?? main.java
字號:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package examen;import java.util.Random;/** * * @author ANGEL */public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here buffer objbuffer; Random r = new Random(); int valor,i; System.out.println("Cuantos hilos"); int tam = Leer.datoInt(); hilo hilos[] = new hilo[tam]; objbuffer = new buffer(2); valor = r.nextInt(500); int j =0; for(i =0;i<tam;i++){ /* if(i<3){ hilos[i] = new hilo(objbuffer,i,true); }else*/ hilos[i] = new hilo(objbuffer,i,r.nextBoolean()); } for(i=0;i<tam;i++){ try{ hilos[i].t.join(); }catch(InterruptedException e){ } } objbuffer.recorrercolas(); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -