1) In this exercise we will create a simple counting thread. It will count to 100, pausing one second between each number. Also, in keeping with the counting theme, it will output a string every ten numbers.
Hint ; Create a class and extend the Thread class. As an option, you can implement the Runnable interface. Override the run() method of Thread. This is where the code will go that will output the numbers. Create a for loop that will loop 100 times. Use the modulo operation to check whether there are any remainder numbers when divided by 10. Use the static method Thread.sleep() to pause. The long number represents milliseconds. 2) Writa program to display two String moving in opposite direction. 3)Write a program to display two String bouncing in opposite direction.