throw vs throws exception in java

We can throw exception deliberately in java using the below line of code

 throw new NullPointerException();

And if we have a piece of code that can throw an exception,instead of enclosing it in try catch block we can use the throws clause on the method in which that exception might be thrown.For example

  public static void mytest()throws Exception

But thing to note is in all the methods in which the above method test will be be called we need to enclose the line where test(); is called in try catch block or use throws clause in those methods as well.

Please note one thing it is not a good idea to use throws clause against main method as in that case JVM will not handle that exception and come out of the program.So in main method if there is some line where exception can be thrown or we call some function in which exception can be thrown better put that line of code in try catch block instead of using the throws clause.