can't get to compare string I'm entering from keyboard to array of string I must and only must declare the string I want like String c = "abc" to check if its in the array I have or not like I cant scan that abc from keyboard then try to check if its in the array or not
import java.io.File;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.Scanner;
public class Funn {
public static void main(String[] args)throws Exception {
int x,q = 0,w=0,i1,j1;
String [][] a= {{"c"},{"gfg"},{"aa"},{"q"}};
String b = null;
Scanner input=new Scanner(System.in);
String c= "aa";
System.out.println(c);
for (int i = 0 ; i < a.length; i++)
for(int j = 0 ; j < a[i].length; j++)
{
if ( a[i][j] == c)
{
i1=i;
j1=j;
System.out.println(i1);
System.out.println(j1);
break;
}
}
}}