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)....
I actually figured it out, before I checked back on here. But thank you!!
Hi Aju,
Thanks! Your solution works for the case I gave above (input string:"The cow jumped over the barn and under the moon" and input: limit = 2). But it doesn't work if i set the limit = 4 for...
Hi, I'm a beginner in java.
I have to write a program that takes a string containing a sentence or a set of sentences, and counts the number of words in the sentence that meet or exceed a...