The Guidelines - Asking Questions is an excellent guide!
There are resources (tutorials, references, examples and more) here: https://processing.org/
Take advantage of the search in the forum and on the main page.
Try to build your code in steps!
Save each working version and then save it as a new version to continue.
MySketch_1_0_0
My Sketch_1_0_1
And so on…
Code is not forgiving!
Pay attention to details and learn from it.
Perseverance and taking advantage of the resources and tools available to you will pay off in the long run.
A snippet of code to get you started:
// Uncomment the String declarations and see what happens!
// Try all the combinations! Each one and both.
// Declare globally:
//String string = "global"; // Declares string
void setup()
{
// Declare locally:
//String string = "setup";
// Trying to print string but it was note declared!
println(string);
}