CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Posts
    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

  2. #2
    Join Date
    May 1999
    Location
    Pune, MH, India.
    Posts
    453

    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
  •  





Click Here to Expand Forum to Full Width

Featured