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
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