Define an exception class called FileNotFoundException.

The class should have a constructor with
no parameters. If an exception is thrown with this zero-argument constructor, getMessage should
return “File Not Found!” The class should also have a constructor with a single parameter of type String. If an exception is thrown with this constructor, then getMessage returns the value that was
used as an argument to the constructor.

```
public class FileNotFoundException extends Exception
{
public FileNotFoundException()
{
super("File Not Found!");
}

public FileNotFoundException(String message)
{
super(message);
}
}

```

Computer Science & Information Technology

You might also like to view...

Discuss three disadvantages of using proprietary software.

What will be an ideal response?

Computer Science & Information Technology

Item 1 in the figure above sets the tween direction.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology