Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void ServiceMethod()
- {
- ExecutorService executorService = Executors.newFixedThreadPool(10);
- executorService.execute(new Runnable() {
- public void run() {
- System.out.println("Asynchronous task");
- }
- });
- executorService.shutdown();
- }
- ExecutorService executorService = Executors.newFixedThreadPool(10);
- static ExecutorService executorService = Executors.newFixedThreadPool(10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement