• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Java 101 ? question about return values (lost)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java 101 ? question about return values (lost)


  • Subject: Re: Java 101 ? question about return values (lost)
  • From: WebObjects <email@hidden>
  • Date: Fri, 20 May 2005 22:41:03 -0700

If you don't mind writing them, I surely love reading 'em!

Thanks for the insight - 'basic' isn't as forgiving about return values, and
I was beginning to think myself a bit crazy(ier).

Have a wonderful evening.


on 5/20/05 18:56, Chuck Hill at email@hidden wrote:

> At 06:19 PM 20/05/2005 -0700, WebObjects wrote:
>> Question: I am calling a function (with boolean return value) in an
>> instantiated class like so...
>>
>> TaskReview review = new TaskReview(); //TaskReview.java is a class
>> review.GetRepsData();
>>
> To follow Java coding conventions and keep key-value coding happy,
> GetRepsData should start with a lower case g.
>
>> ....but, "GetRepsData();" is defined to return a value (a boolean).  As you
>> can see, "review.GetRepsData();" doesn't assign the returned value, and
>> there are no compilation errors or runtime errors.  Why?
> Um, 'cause that's how Java and most simlar languages work?
>
>> Why doesn't the
>> call to this function w/out assigning the return value create any problems?
> Why should it?  Do you need more problems in your code?  :-P
>
>> And where is my mandated return value disappearing to?
>>
> It is with the spirit of Dev Null in the great bit bucket in the sky.
> Gone, never to be seen again.
>
>> I realize this isn't a Java mailing list, but you've all been very generous
>> in support of Java questions in context to WO dev, and I appreciate it.
>>
> I don't know how much that helped you, but I had fun writing it.  ;-)  Java
> is quite happy to ignore return values.  Doing something with them is fully
> optional.
>
> Chuck
>
> --
>
> Practical WebObjects - a book for intermediate WebObjects developers
> who want to increase their overall knowledge of WebObjects, or those
> who are trying to solve specific application development problems.
> http://www.global-village.net/products/practical_webobjects
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.concyse.com/
> ______________________________________________________________________


 _______________________________________________
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

References: 
 >Re: Java 101 ? question about return values (lost) (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Exception occurred while handling request: ... Unable to createpage....
  • Next by Date: many-to-many insert/edit relationship [w PWO identification scheme]
  • Previous by thread: Re: Java 101 ? question about return values (lost)
  • Next by thread: Exception occurred while handling request: ... Unable to create page....
  • Index(es):
    • Date
    • Thread