Question
Create a class named LongTaskthat extends the Threadclasscontaining the following:Private instance variablessharedData(of type SharedResults), inputData(of type StringBuffer)and target(of type char) Constructor thattakes three arguments and
Create a class named LongTaskthat extends the Threadclasscontaining the following:Private instance variablessharedData(of type SharedResults), inputData(of type StringBuffer)and target(of type char) Constructor thattakes three arguments and stores them in the instance variables.It should alsocreate a name for this thread as Thread_
this is the code
public class LongTask extends Thread { //Create private instance variables SharedData, inputData, target private SharedResults sharedData; private StringBuffer inputData; private char target; //create constructor with three arguments public LongTask(SharedResults sharedData, StringBuffer inputData, char target) { this.sharedData = sharedData; this.inputData = inputData; this.target = target; //it should also create a name for this thread as Thread_ } I stuck at the for loop I didn't know what to do and what is this it should also create a name for this thread as thread_ here I lost and I couldn't complete it?? any help??
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started