I have a matrix and I need to find the index of a specific element in a column .
I have seen the index of method but only used in normal arrays of strings, ints etc not in arrays of arrays or arrays.
for example I have String tablero[][]= new String[15][35];
and I want to do something like
tablero.indexOf(tablero[columna], "*");// claramente esto no funciona
int indice=tablero[columna].indexOf("*")// esto tampoco
I'm trying to do it following this example
import java.io.*;
public class Test {
public static void main(String args[]) {
String Str = new String("Welcome to Tutorialspoint.com");
System.out.print("Found Index :" );
System.out.println(Str.indexOf( 'o' ));
}
}