What is the value of numOfball used for?
What does a message with "throw" mean? How does that message relate to the value of numOfball?
Please edit your post and wrap your code with code tags:...
Type: Posts; User: Norm
What is the value of numOfball used for?
What does a message with "throw" mean? How does that message relate to the value of numOfball?
Please edit your post and wrap your code with code tags:...
Why does the code copy the value of numOfball from the Ball object it just created?
WHere is the code that calls a set method ONE TIME to set the value of numOfball that all the Ball objects to...
Then why does the constructor set the value of numOfball? Each call of a constructor will change its value?
Why not set it one time from outside of the constructor?
Can you describe what values the numOfball variable is supposed to hold? Should each instance of the Ball class have its own value? Making it static means that all instances share the ONE variable....
Why does each constructor set the value of the static variable? Each one is changing the value that the last one set.
There is only one copy of a static variable shared among all the class objects....
Please post a small complete program that compiles, executes and shows the problem.
Be sure to wrap your code with code tags:
<YOUR CODE HERE>
to get highlighting and preserve formatting.
Not sure what "synchronized" means here.
Can you post some output from the program that shows what you are talking about? Add some comments to explain what the problem is.
Please edit your...