Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/06/2013, 10:43
Avatar de razpeitia
razpeitia
Moderador
 
Fecha de Ingreso: marzo-2005
Ubicación: Monterrey, México
Mensajes: 7.321
Antigüedad: 19 años, 1 mes
Puntos: 1360
Respuesta: variable no reconocida

1. No tienes un método FindHiddenWords, tienes una clase llamada FindHiddenWords.
2. matrixWidth y matrixHeight los estas declarando dentro del constructor, cuando deberías declararlos fuera del constructor.

Código Java:
Ver original
  1. public class FindHiddenWords {
  2.  
  3.   public static final char UNKNOWN = '?';
  4.   int matrixWidth;
  5.   int matrixHeight;
  6.  
  7.   public FindHiddenWords(int targetWidth, int targetHeight,
  8.       String[] wordsToFind) {
  9.       matrixWidth = targetWidth;
  10.       matrixHeight = targetHeight;
  11.   }
  12.  
  13. void initializeMatrix() {
  14.    
  15.       char [][] matrix;
  16.          if (matrixWidth == 0 || matrixHeight == 0){
  17.              matrix [1][1] = UNKNOWN;
  18.          }
  19.          else {
  20.          matrix = new char[matrixWidth][matrixHeight];
  21.          for (int i=1; i<matrixHeight){
  22.              for (int j=1; i< matrixWidth){
  23.                  matrix [i][j] = UNKNOWN;
  24.                  j++;}
  25.              }
  26.              i++;
  27.          }
  28.       }