+ 1
Java class library
Can we import this three ijava class and method library or whatever it's name in sololearn Java? import java.concurrent.Executors; import java.concurrent.ExecutorService; import java.concurrent ThreadPoolExecutor;
6 ответов
+ 2
Sololearn have limited support for java libraries..
I think it can't support multi threads properly.. Just considers sequential flow instead of threads..
+ 2
Try it this way
import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
You are missing the .util.
+ 2
What is not working?
I get all three classes Imported w/o any error.
https://code.sololearn.com/cO51sBEGq9K0/?ref=app
0
Ok, the hierarchy is not clear yet to me. I Will try it later. Thank you.
0
It doesn't work. I have imported java.util.concurrent Executors and Java.util.concurrent.ExecutorService.
0
Yes, But I tried not to use those 3 Java classes. Insrtead of import those classes, I juat import secure random generator to generate random numbers as timer for thread. I use conventional method for creating a thread by implementing Runnable interface, and it run successfuly.