Advertisement
jaVer404

level16.lesson10.task03

Sep 11th, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. package com.javarush.test.level16.lesson10.task03;
  2.  
  3. /* Снова interrupt
  4. Создай нить TestThread.
  5. В методе main создай экземпляр нити, запусти, а потом прерви ее используя метод interrupt().
  6. */
  7.  
  8. public class Solution {
  9.     public static void main(String[] args) throws InterruptedException {
  10.         //Add your code here - добавь код тут
  11.         TestThread testThread = new TestThread();
  12.         testThread.start();
  13.         testThread.interrupt();
  14.     }
  15.  
  16.     //Add your code below - добавь код ниже
  17.     public static class TestThread extends Thread {
  18.         public void run() {}
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement