Course Solutions Uncategorized (Solved) : Need Code Java Please Declare 2d Array Characters Search Char Sequence Creating Word Rows Q32218795 . . . .

(Solved) : Need Code Java Please Declare 2d Array Characters Search Char Sequence Creating Word Rows Q32218795 . . . .

 

i need this code in java please declare an 2D array ofcharacters and search for a char sequence(creating a word ) in rowsonly (horizontaly ) Example 2D array , the word Input:CAT

A B C D E

A C A T N

G H I C T

L M C A T

output:Found Word “CAT” Row 1 col 1 and row 3 col 2

i solve it like that but nothing is outputed i need to know whatis wrong and how to solve it

for(int i=0;i<wordpuzzle.length;i++)
{ for(int j=wordpuzzle[i].length;i<0;j++)
{
if(wordpuzzle[i][j].equals(word.charAt(index)))
{
temp+=wordpuzzle[i][j];
index++;

}   
if(temp.equals(word))
{
System.out.print(“Found at row”+i+”col”+j);
}
  
}

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered) : Project Manager Designing New Product Project Able Divide Project 8 Activities Follows Act Q34314881(Answered) : Project Manager Designing New Product Project Able Divide Project 8 Activities Follows Act Q34314881

<br/><img src="https://media.cheggcdn.com/media%2Ff00%2Ff00f0416-aa17-4de7-aa95-78d861fd9428%2Fimage.png" alt="The project Manager of designing new product project was able to divide the project into 8 activities as follows: Activity Predecesso Estimated Time (Days) 20% of B 40%