aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Error in my code: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Error in my code:" Watch "Error in my code:" New topic
Author

Error in my code:

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944

Error in my code:
<pre>
class Excep14
{
public static void main(String arr[])
{
int l = arr.length ;
FileNotFoundException fe = new FileNotFoundException("hello");
try
{
throw fe;
}
catch(FileNotFoundException e)
{
System.out.println(e.getMessage());
//throw e ;
}
finally
{
System.out.println("outer finally");
}
}
}
</pre>
[This message has been edited by maha anna (edited April 07, 2000).]
Jane Rozen
Ranch Hand

Joined: Feb 12, 2000
Posts: 53
psethura, before somebody else starts analyzing your code , could you first try to tell us (and yourself) STEP BY STEP what you are trying to do here. You may as well find the right answer.
This is what I usually ask my students to do... it works!
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
psethura,
I request all , any time a qstn is posted please don't post like this. Clearly say what do you think and why, and what do you want. People will be more interested and easy for us also to answer quickly.
regds
maha anna
Kondal Rao
Greenhorn

Joined: Apr 05, 2000
Posts: 18
Psethura,
I agree with Jane and Maha. But, I tried cut pasting your code and compiling. Then the compiler shouted saying that it doesn�t know what is FileNotFoundException. If you want to throw this exception, you need to import java.io.* package.
Once you do this, your program compiles and runs. But I am not 100% sure that this is your problem.
Regards,
Kondal.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in my code: