[Solved] Falling objects in java? [closed]


“but they all fall from the top of the screen where y=0”

This coincides with your requirement (which you mention a few lines above) so this is fine.
You just need to make the x value random. So keep y=0 as a constant, and just make the x random.

Look at this class:

Random

Use this method to get a random value for x:

nextInt

0

solved Falling objects in java? [closed]