syntax error


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

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

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center