Cannot find symbol java error (newbie question)



Hello all!

I'm normally good at finding why a java compiler can't find a symbol,
the methods have different calling types in their parameters,
mispelling of a variable, certain letters were captialized while
others were not but this has me totally stumped. Here is a simplified
version of my program.

import java.util.*;
import java.lang.*;

public class myProg{

public static void main(String[] arguments) {
int size = 10; // arbritray size - test number
LinkedList [] bucketArray = new LinkedList[size];

// next try to insert the value into bucket array
//bucketArray[1] = array[0]; incompatible types (my first
attempt to assign a value :p)

Integer four = new Integer(4); //so now four is an object
bucketArray.insert(four,0); //cannot find symbol
} //end of main

class LinkedList{
private Node head;
private int length;

public LinkedList() {
this.head = null;
this.length = 0;
}

public void insert (Object data,int position){
System.out.println ("Node code here\n");

}
}

Essentially, I'm trying to initiialize the bucketArray with a value.
I really want the cell of the array to hold a string of characters but
for simplicity sake I made it into an integer for now just to get it
compiling. When I shortened this program to post it here, I took out
the existing Node class that I put in place, but I don't think this
should affect anything (at least I hope it doesn't.)

So, what is wrong? I am passing 2 parms, one object, the other an
int...I think I'm referencing it correctly to call 'insert' within the
LinkedList class. I've checked and rechecked it and frankly, I'm
stumped.

Sidenote: from past advice, I understand that the array is really
holding a reference in the array I created. That doesn't really
affect me, does it? Isn't that internal? Is there a special way to
specify whether it is a reference or whetehr it holds a specific
value?

Any help is again appreciated,
-t (the

.



Relevant Pages

  • Re: Cannot find symbol java error (newbie question)
    ... I'm normally good at finding why a java compiler can't find a symbol, ... the methods have different calling types in their parameters, ... // next try to insert the value into bucket array ... holding a reference in the array I created. ...
    (comp.lang.java.programmer)
  • Re: VB-101: Passing Arrays ByVal vs ByRef
    ... changed if an array is passed by Val. ... ' new reference ... As each function creates a new array object, ... 'secondArray' and 'secondArrayCopy'. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Need help with textboxes
    ... The JavaScript 1.5 Reference already states: ... All forms and their children are stored in an array ... use dot notation or object literals. ... No. Bracket property accessors allow their argument to be any string value. ...
    (comp.lang.javascript)
  • Re: Garbage Collection Issues in long-standing services
    ... the pinned array should get unpinned or ... The receive case is done quite well, I do create a 4K buffer and reuse it ... and remove the reference to my wrapper socket class, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to give selective access to the methods in a class?
    ... different memory locations at different times. ... The reference still leads to the ... So array resizing ... program pushes certain objects into the circular buffer, ...
    (comp.lang.java.programmer)