On Jan 28, 5:00 pm, rler...@telus.net wrote:
> I have a method defined as follows in a class:
>
> public static void salary_proj_accept()throws IOException
> {
> statements;
> }
>
> Later in the same class I have another method
>
> public void salaryPay(float startsalary, float salaryincrease, int
> percentincreasefro, int percentincreaseto, int yearto)
// declare it throws an IOE
throws IOException
> {
>
> I'm trying to call the first method by:
> salary_proj_accept();
> }
>
> However when I do so, I'm told I need to throw an exception...
....
> Is there a way that I can call my first method?
try {
salary_proj_accept();
catch (IOException ioe) {
ioe.printStackTrace();
}
Note
- Please follow the common class/method/attribute
conventions for names, e.g. salaryProjAccept()
when posting code
- comp.lang.java.help is a good group for those
starting Java.
HTH
Andrew T.
|