I want to write an onClick function for each of the anchor tags such that the src of the image embedded within the link that is currently clicked is changed to "spinning-ball.gif" and the image-source of the last clicked link changes back to the original.
Example : If clicked Link A
Link A : Image-source = spinning-ball.gif AND
IF clicked Link B
Link A : Image-sorce = changes back to static-ball.gif AND
Link B : Image-source = spinning-ball.gif
Viewers will learn one way to get user input in Java.
Introduce the Scanner object:
Declare the variable that stores the user input:
An example prompting the user for input:
Methods you need to invoke in order to properly get user input: