Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.mycompany.app21;
- /**
- *
- * @author Admin
- */
- public class Main2 {
- public static void main(String[] args) {
- // создаем поток и выполняем MyLongTask в отдельном потоке (в асинх-м режиме)
- Thread th1 = new Thread(new MyLongTask());
- // запускаем th1
- th1.start();
- try {
- Thread.sleep(8000);
- } catch (InterruptedException ex) {
- ex.printStackTrace();
- }
- System.out.println("I am here!!!!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement