R
rleroux
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)
{
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...so I
replace with:
salary_proj_accept()throw IOException
When I do, I then get:
Salaryprojection.java:89: ';' expected
salary_proj_accept()throws IOException;
^
Salaryprojection.java:89: not a statement
salary_proj_accept()throws IOException;
Is there a way that I can call my first method?
Tnx
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)
{
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...so I
replace with:
salary_proj_accept()throw IOException
When I do, I then get:
Salaryprojection.java:89: ';' expected
salary_proj_accept()throws IOException;
^
Salaryprojection.java:89: not a statement
salary_proj_accept()throws IOException;
Is there a way that I can call my first method?
Tnx