Glad I could help! Good luck with your program!
Type: Posts; User: snowguy13
Glad I could help! Good luck with your program!
Follow Norm's advice. Trust me. It's helped me many times. :D
To make my previous post more clear, think about this code:
String example = "thunderstorm";
System.out.print(example.substring(0,...
Okay, I think I know what the issue is.
while(y < a.length() && y < b.length())
This is tough to explain without giving it away, but here it goes: think about how the substring() method works....
You define these at the start of the stringMatch() method, but do you ever change their values? The statement...
if(aa.equals(bb))
...will compare the same thing for each iteration of the while...
Firstly, can you please surround your code //your code here like that so it is easier to read?
Then, I have a question: do the matching substrings have to start at the same index?
So, for example...