Java compiler (Jdk v11.0.2) giving the mentioned error.

Actually I tried writing code to print numbers from 1 to 5 and then 5 to 1 with 200ms delay simultaneously using multithreading function in java but it's showing an error for try and catch block - error:

> 
> illeagal start of type catch(Exception e)
> 
> 
> 

```
class Threaddemo extends Thread
{
   public static void run() 
   try
   {
     for(i=1;i<=5;i++)
     {
       System.out.println(i);
       Thread.sleep(200);
     }
   }
   catch(Exception e)
   {
     System.out.println("exception found");
   }
}

class Threaddemo1 extends Thread
{
  public static void run()
  {
    try
    {
      for (i=5;i>=1;i--)
      {
        System.out.println(i);
        Thread.sleep(200);

      }
    }
    catch(Exception e)
    {
      ("exception2 found");
    }
  }
}

class mainclass
{

public static void main(String arg[])

  {
    threaddemo obj1=new threaddemo1();
    threaddemo1 obj2=new threaddemo();
    obj1.start();
    obj2.start();
  }
}

```