#Multithreading
17 messages ยท Page 1 of 1 (latest)
โ This post has been reserved for your question.
Hey @livid prairie! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
I'd say Runnable, bc you can inherite from only one class but you can implement a lot of interfaces
But in general there is no better or worse option as far as i know
How come when you implement runnable you don't have to extend Thread
Yeah, that is the point^^
Or was that a question?
It is a question hahaha
Okay ๐
Consider this to be your class implementing Runnable:
public class TheRizzler implements Runnable {
//Write fields, constructors, methods, whatever
public void run() {
//Write what your Thread should run, for example:
System.out.println("Hawk Tuah Skibidi");
}
}
Now later in your code you can execute your Thread, that is the run method you defined in your Runnable implementation, like this:
TheRizzler sigma = new TheRizzler();
Thread ohio = new Thread(sigma);
ohio.start();
๐ค Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.
Brainrot-infused coding tips ๐
Also please note Java naming conventions: It should be class TheRizzler.
Fair
I'm so sad Java has no #define, there would be marvellous brainrot. I would mogg you all to Ohio.
๐ค Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.