Our code generates and starts two concurrent threads, labelled as thread1 and thread2. Each thread, after being initiated, displays a message confirming that it is operational, then takes a pause for 1000 milliseconds (1 second), and following the pause, shows a message informing that it has finished. Finally, the main thread patiently waits for the termination of both threads using the join() method for each one. Once both threads have finished, the main thread shows a message affirming that both threads have executed and finished their tasks.
Order the code lines correctly to run the program.