Re: java 101 question "integer compare"
Re: java 101 question "integer compare"
- Subject: Re: java 101 question "integer compare"
- From: Alan Ward <email@hidden>
- Date: Thu, 20 Apr 2006 09:35:34 -0600
System.out.println("newDonor is a " + newDonor.getClass().getName());
Regards,
Alan
On Apr 20, 2006, at 9:25 AM, WebObjects wrote:
Perhaps it's an off-blend of coffee that is obscuring my vision,
but why in
the world would I be getting "cannot resolve symbol : method compareTo
(java.lang.Integer)" when I know this object is an Integer.
Is there a simple one-liner System.out.printlin statement that I
can use to
test the object type to see why it's not behaving?
Yes - I know this isn't java101 (but you're all so giving, and I'm
oh so
taking)
-Bill
public String alter_gender_display_data() {
if(newDonor.intGender().compareTo(new Integer(0)) == 0) {
return "Male";
}else{
return "Female";
}
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden