Why do we need Synchronized method in Threads?

This program is running fine.I have used join to access the resource at a time.But i have seen so many people using synchronized method or block to show only one thread access to the resource at a time .But if we can do it using join then why do we need synchronized method or block.What's the difference between them?

public class Main implements Runnable{

   static int count = 0;

   public void run(){

       for(int i = 1; i <= 10000; i++){
        count++;
       }


  }

  public static void main(String[] args) {


   Thread t1 = new Thread(new Main());
   Thread t2 = new Thread(new Main());

   t1.start();
   try{

     t1.join();

   }
  catch(InterruptedException ex){

    System.out.println(ex);

  }

    t2.start();

   try{

    t2.join();

   }
  catch(InterruptedException ex){

   System.out.println(ex);

  }


  System.out.println(count);


 }
 }