import java.util.Map;

/**
 * Created by Vol4ica on 13.06.2015.
 */
public class Main {

    public static void main(String[] args) throws InterruptedException {
        Page page1 = new Page("First", 0);
        Threads t=new Threads();
        String a=page1.Namepage;
        Thread t1 = new Thread(t);
        t1.setName(a);


        Page page2 = new Page("Second",0);
        String b=page2.Namepage;
        Thread t2 = new Thread(t);
        t2.setName(b);

        Page page3 = new Page("Third",0);
        String c=page3.Namepage;
        Thread t3 = new Thread(t);
        t3.setName(c);

        Page page4 = new Page("Fourth",0);
        String d=page4.Namepage;
        Thread t4 = new Thread(t);
        t4.setName(d);

        Page page5 = new Page("Fifth",0);
        String e=page5.Namepage;
        Thread t5 = new Thread(t);
        t5.setName(e);

        t1.start();
        t2.start();
        t3.start();
        t4.start();
        t5.start();



        System.out.println("Finish. Page1="+page1+'\n'+"Page2="+page2+'\n'+"Page3="+page3+'\n'+"Page4="+page4+'\n'+"Page5="+page5);
    }
}
