So I know it's wrong but curious about exactly why please explain.
I know we're supposed to create a new Thread object which then passes the new SpecialThread as an argument but I don't understand why we break from our standard initializing procedure of
ObjectType variableName = new ObjectOfObjectType(passed arguments);
package com.codegym.task.task16.task1603;
import java.util.ArrayList;
import java.util.List;
/*
A list and some threads
*/
public class Solution {
public static volatile List<Thread> list = new ArrayList<>(5);
public static void main(String[] args) {
list.add(Thread thread1 = new Thread(SpecialThread());
list.add(Thread thread2 = new Thread(SpecialThread());
list.add(Thread thread3 = new Thread(SpecialThread());
list.add(Thread thread4 = new Thread(SpecialThread());
list.add(Thread thread5 = new Thread(SpecialThread());
}
public static class SpecialThread implements Runnable {
public void run() {
System.out.println("This is the run method inside SpecialThread");
}
}
}