Thank you so much andreas!!!!
I used: int x = Integer.parseInt(str.substring(0,1));
And now my program works perfectly!
Type: Posts; User: rk2010
Thank you so much andreas!!!!
I used: int x = Integer.parseInt(str.substring(0,1));
And now my program works perfectly!
Sure! Here is the repeat method that I'm using:
public static String repeat(int i, char c){
String tst = "";
for(int j = 0; j < i; j++){
tst = tst+c;
}
return...
Thank you for your suggestion. I understand now that I didn't account for null strings. I'm still getting an error though, and I'm not sure why or how to fix it. I've tried tracing my code with...
Hi,
I have to write a program that decompresses a string in RLE recursively WITHOUT any loops. I've just learned recursion...and I think I understand it mostly (calling a method within itself)....