I'm trying to make a method that will take an array of strings and return an array with all the words in reverse order but my code is not working.
When I run it i get "[Ljava.lang.String;@74122d9c"
Test case: String[]words={"Monday","Tuesday","Wednesday"}; -->{"yadnoM","yadsueT","yadsendeW"};
public String[] reverseString(String[] words)
{
String[] t=new String[words.length];
for(int i=0;i<words.length;i++)
{
for(int j=words[i].length()-1;j>=0;j--)
{
t[i]+=words[i].substring(j,j+1);
}
}
return t;
}