i have to do ball Flying left, and when it reach wall it return
Hello, and welcome to the forum!
Nice to have you here.
You need a Sketch with setup and draw.
Please use ellipse command to draw a circle:
ellipse (100,100,10,10);
See reference
Then replace the y value with a variable y and say y--;
Processing has several “bouncing” examples:
The term for knowing when to bounce is “collision detection.” You can find several good tutorials on collision detection in Processing with examples, here is one: