Search:

Type: Posts; User: rk2010

Search: Search took 0.19 seconds.

  1. Replies
    7
    Views
    1,000

    Re: Java program (beginner) help?!

    Thank you so much andreas!!!!
    I used: int x = Integer.parseInt(str.substring(0,1));
    And now my program works perfectly!
  2. Replies
    7
    Views
    1,000

    Re: Java program (beginner) help?!

    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...
  3. Replies
    7
    Views
    1,000

    Re: Java program (beginner) help?!

    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...
  4. Replies
    7
    Views
    1,000

    Java program (beginner) help?!

    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)....
  5. Replies
    7
    Views
    1,443

    Re: Begginer Java - Bug in my code?

    I actually figured it out, before I checked back on here. But thank you!!
  6. Replies
    7
    Views
    1,443

    Re: Begginer Java - Bug in my code?

    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...
  7. Replies
    7
    Views
    1,443

    Beginner Java - Bug in my code?

    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...
Results 1 to 7 of 7