-
-
Save NitinRanjan/72f14de51d1b340f32dbd27e02f30cc5 to your computer and use it in GitHub Desktop.
Callable example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package service; | |
import java.util.concurrent.Callable; | |
public class CallableService implements Callable{ | |
@Override | |
public String call() { | |
try { | |
Thread.sleep(1000); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} | |
return Thread.currentThread().getName(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment