Need help with JAVA

Xylitol

Diamond Member
Aug 28, 2005
6,617
0
76
public String encrypt(String word)
{
int pos = word.length() / 2;
if(pos >= 1)
{
word = encrypt(word.substring(pos)) +
encrypt(word.substring(0, pos);
}
return word;
}
What is the contents of the string returned by encrypt("SECRET")?
 

jm20

Member
Oct 3, 2004
57
0
0
it just returns <h> when there is "http://" and "not found" when the substring is not found in the string.
 

Gunslinger08

Lifer
Nov 18, 2001
13,234
2
81
Originally posted by: jman19
Why not just trace the program execution on paper?

Ding. Do your own homework. This isn't even programming.. just following a step by step process.