The second approach was made class that Implements...
# getting-started
g
The second approach was made class that Implements Runnable and accepts whole state in constructor