Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java thread: problem with array


Message #1 by tnn298091@w... on Mon, 26 Nov 2001 23:29:06
Hello again!
You declared the array TextField keysArray[]; two times.
One time - as global private class variable that can be seen anywhere in
class
and second time in constructor:    TextField[]keysArray = new TextField[16];
This time it is inner variable of constructor, it overrides the declaration
of global variable and can be seen only inside of constructor.
This second time declaration is wrong.
instead of
TextField[]keysArray = new TextField[16];
you should write
keysArray = new TextField[16];
This will initialize already declared array.

Good Luck!
Michael.

> Hello all,
> Can anyone help me to make this program run correctly,I would be
> appreciated.




  Return to Index