DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: syntax error

  1. #1
    Join Date
    Jan 2008
    Posts
    18

    syntax error

    also plz tell if there is nething wrong in this piece of code-
    Code:
    public static final Integer multiply(Integer x, Integer y) {
    return (y == 0) ? 0 : multiply(x, y - 1) + x;
    }
    I think as the return type is static and final we can't return different value everytime?

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    that just means that the Integer you are returning cannot be subclassed . Doesn't mean that there is only one answer returned by the method.

Similar Threads

  1. Replies: 0
    Last Post: 04-03-2009, 03:13 AM
  2. syntax error from function in include file
    By larryy@indiana. in forum ASP.NET
    Replies: 1
    Last Post: 03-20-2009, 01:29 PM
  3. SQL Statement
    By shers in forum Database
    Replies: 4
    Last Post: 06-17-2006, 04:01 AM
  4. I can't link FreeImage to C#
    By mesh2005 in forum .NET
    Replies: 1
    Last Post: 03-06-2006, 08:16 AM
  5. Syntax Error Updating SQL Server Table
    By Ralf in forum Database
    Replies: 26
    Last Post: 08-08-2002, 08:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links