Why i am getting Error if i use try catch
<p>i wrote an function like </p>

<pre><code>public static boolean check()throws Exception
{
  if(a=="asd")
return true;
else
return false;

}
</code></pre>

<p>this works fine
but if i use</p>

<pre><code>public static boolean check()
{
try
{
  if(a=="asd")
return true;
else
return false;
}
catch(Exception e)
{
}
} 
</code></pre>

<p>it says you need to return an value,,,, is there is any difference between these two???</p>
