|
-
August 19th, 1999, 09:47 AM
#1
Returning an Object from a find()....
Hi All:
This code compiled fine in Java 1.0; when porting it to the
Java 1.1 compiler - the compiler is complaining that this
find() method needs a return. I've tried returning multiple objects
all to no avail & would greatly appreciate some expert feedback
here if possible. Thanks in advance:
public Object find(int i, String s, List li
-
August 22nd, 1999, 10:58 AM
#2
Re: Returning an Object from a find()....
R u getting error which is similar to...
'method find(..) should return a value'.
Actually from JAVA1.1 onwards it is a must that if a method declares that it will return something, it should return the value in any case.
In ur code the u haven't returned anything if the method gets till the last statement of ur method.
- UnicMan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|