- my webspace

- my webspace

Latest Comment

Why I must believe in GOD
Testing time is almost passed..there are many colours in lif...
27/06/12 01:43 More...
By Tarun Shekhawat

Allama Iqbal - Selective verse...
Yahoouj
Really good work about this website was done. Keep trying mo...
07/03/10 15:04 More...
By Roderick

Allama Iqbal - Selective verse...
Great Job
You have dont a great job of collecting these... Even I had ...
25/08/09 01:01 More...
By Sikandar

O ye who don't believe !
It's like Lehman Brothers :grin
11/10/08 10:31 More...
By anurag Chaturvedi

I Protest
@Sikku
Thanks Sikku for the feedback. I never intend to blame, a...
29/07/08 11:06 More...
By Aminur Rashid

Login






Lost Password?
Home arrow Blog arrow Maoistan
Maoistan PDF Print E-mail
User Rating: / 2
PoorBest 
Written by Aminur Rashid   
Friday, 28 May 2010
.
package aminur.gyaan;

/*
 * @author aminur ^ nospam.com
 */
public class India extends Thread {
    private volatile static int USUAL_TIME = 1000;

    private volatile static boolean BAU = true;

    public void run() {
        while (BAU) {
            System.out.println("Keep Running...");
            try {
                sleep(USUAL_TIME);
            } catch (InterruptedException e) {
                System.out.println("Damn!! Is it election time...");
            }
        }
    }
    /*
     * Who said destroy is deprecated :)
     */
    public void destroy() {
        BAU = false;
    }

    public static void main(String args[]) {
        India india = new India();
        india.start();
        Thread th = new Thread(india.new Maoist(india));
        th.start();
    }

    class Maoist implements Runnable {
        private India india;

        Maoist(India india) {
            this.india = india;
        }

        public void run() {
            System.out.print("Beep you");
            india.destroy();
        }
    }

}



StumbleUponDigg This!Bookmark on Delicious

Add as favourites (496) | Quote this article on your site | Views: 2358 | E-mail

Be first to comment this article
RSS comments

Only registered users can write comments.
Please login or register.

 
< Prev   Next >
Aminur Rashid