Article View: borland.public.jbuilder.java.language
Article #8823error in class
From: KKenn10658
Date: Wed, 28 Feb 2001 23:06
Date: Wed, 28 Feb 2001 23:06
25 lines
1365 bytes
1365 bytes
I am getting an error when I try to run this program. The compiler is telling
me that I need a semi colon between the pay and the (). This does not make
sense to me because it does not give me the same error for the outputString()
below it. I am new to Java, so it may be something simple that I am missing.
class SalaryRecord extends PayrollRecord {
int RECORD_TYPE = 1;
public SalaryRecord(String empid, double s)
{
id = empid;
Salary = s;
double pay() //error: need ";" between pay
and()
{
return salary/26;
}
String outputString()
{
return RECORD_TYPE+","+id+","+Salary;
}
}
}
Thanks, kevin
Technical Details
Message-ID:
<20010228180603.13116.00000312@ng-ba1.aol.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!europa.netcrusader.net!152.163.239.131!portc03.blue.aol.com!audrey04.news.aol.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,c747b3746c80a98,start X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-02-28 15:10:06 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!europa.netcrusader.net!152.163.239.131!portc03.blue.aol.com!audrey04.news.aol.com!not-for-mail Lines: 25 X-Admin: news@aol.com From: kkenn10658@aol.com (KKenn10658) Newsgroups: borland.public.jbuilder.java.language Date: 28 Feb 2001 23:06:03 GMT Organization: AOL http://www.aol.com Subject: error in class Message-ID: <20010228180603.13116.00000312@ng-ba1.aol.com>