DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Feb 2005
    Posts
    22

    Cannot resolve symbol variable

    I'm doing something stupid again and i'm not seeing it. Ive attached the whole program and a text file in case anyone wants to try it but here's my problem:
    all works fine until I try to call 'calculate' from main. I'm getting the 'cannot resolve symbol variable' and I don't understand why. This all worked when I tried it in a program by itself.

    In the main method i have: calculate(dataArray);
    To call:
    public static void calculate( int dataArray[]){
    int[] tempHolding = new int [dataArray.length];
    calculate(dataArray, tempHolding, 0); // call private calculate function and pass perameters
    }

    private static void calculate(int dataArray[], int tempHolding[], int last){
    for (int i = last; i < dataArray.length; i++){
    tempHolding[i] = dataArray[i];
    calculate(dataArray, tempHolding, i +1);
    tempHolding[i] = 0;
    }
    for (int i = 0; i < tempHolding.length; i++){
    if (tempHolding[i] != 0){
    System.out.print (tempHolding[i] + " ");
    }
    System.out.println();
    } //END OF RECURSIVE ADDITION
    Attached Files

Similar Threads

  1. Help with class/applet
    By none_none in forum Java
    Replies: 17
    Last Post: 04-28-2005, 03:00 PM
  2. Replies: 5
    Last Post: 10-17-2002, 01:58 PM
  3. cannot resolve symbol
    By Janie in forum Java
    Replies: 0
    Last Post: 09-08-2001, 11:16 AM
  4. Cannot Resolve Symbol Error
    By jay in forum Java
    Replies: 2
    Last Post: 05-17-2001, 11:15 AM
  5. compiling
    By John Butorac in forum Java
    Replies: 2
    Last Post: 12-16-2000, 12:27 PM

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