Help with operator "&&"

Hey i have a problem with my code.
the console says , unexpected tocen ,&&" in th lower code.

import processing.pdf.*;

int money;
int mpc;         //money per click
int owned1;      //owned first upgrade
boolean buy1;
int rx1 = 200;
int ry1 = 300;
int rwidth1 = 300; 
int rheight1 = 150;
int rx2 = 1000;
int ry2 = 300;
int rwidth2 = 1200; 
int rheight2 = 150;

PImage pic1;
PImage pic2;

void setup() {
  pic1 = loadImage("foto_1.png");
  pic2 = loadImage("foto_2.png");
  size(1200, 750);
}

void mousePressed() {
  if (rx1 <= mouseX && mouseX <= rx1 + rwidth1 &&
    ry1 <= mouseY && mouseY <= ry1 + rheight1) {
    money = money + mpc;
    }
    
      if (rx2 <= mouseX && mouseX <= rx2 + rwidth2 &&
    ry2 <= mouseY && mouseY <= ry2 + rheight2)  {
    buy1 = true;
    }
}

void draw() {

      fill(0,0,0);
      background(200);
      println(money);
      textSize(40);
      fill(0);
      
      image(pic1, 200, 300);
      pic1.resize(0, 150);
      image(pic2, 1110, 0);
      pic2.resize(0, 800);
      
      fill(1,0,0);
      text("Money:", 240, 246);
      textSize(40);
      text(money, 390, 250);

    }
    
public static void main(String[] args) {
  if(buy1) && money >= 10 {
  money = money - 10;
  owned1 + 1;
  mpc = mpc + 1;
  }
}

Hello,

Please format your code as per:
https://discourse.processing.org/faq#format-your-code

This helps us help you.

Check your brackets in the if statement.
if \ Language (API) \ Processing 3+

:)

For starters…

Correct the brackets in the if statement.
The if statement (and only that) belongs in the draw.

``:)~`

There are resources (tutorials, examples and references) here to assist you with programming with Processing:
https://processing.org/

The public static void main(String[] args) does not belong in this code.
Processing generates JAVA code in the background for you; most will never see this!

Processing Sketch Code
//global variables here

void setup() 
	{
  size(100, 100);
	//Code here
  }

void draw() 
	{
  background(128);
  // Code here
	}
Java Code created by Processing
import java.util.HashMap; 
import java.util.ArrayList; 
import java.io.File; 
import java.io.BufferedReader; 
import java.io.PrintWriter; 
import java.io.InputStream; 
import java.io.OutputStream; 
import java.io.IOException; 

public class sketch_210404b extends PApplet {

//global variables here

public void setup() 
  {
	//Code here
  }

public void draw() 
       {
  background(128);
  // Code here
	}
  public void settings() {  size(100, 100); }
  static public void main(String[] passedArgs) {
    String[] appletArgs = new String[] { "sketch_210404b" };
    if (passedArgs != null) {
      PApplet.main(concat(appletArgs, passedArgs));
    } else {
      PApplet.main(appletArgs);
    }
  }
}

You can look in your %temp% folder for the JAVA files that Processing generates. Again, most will never see this when working with Processing.
I have on occasion gone in there if a sketch crashes and I did not have saved code.

:)