Search:

Type: Posts; User: Saintroi

Search: Search took 0.08 seconds.

  1. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Ahhh I forgot to do it in the second one! That fixed it! Everything looks like it works now, I will post again if I have another problem! Thanks a ton!
  2. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    And after changing that, it does, in fact, get past that error. However, another one does occur.

    "java.lang.StringIndexOutOfBoundsException: String index out of range: 6926
    at...
  3. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Hmm.. it might mean that. I guess i'll take the numbers out? And no, I dont need to count the numbers, just letters.
  4. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Great help! Turns out it ended up being a number! But that doesnt make sense to me because this should have removed numbers:



    public String getFile()
    {
    return...
  5. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Also, could you tell me why it is not printing to a file like it should? It makes the file, but its empty.

    Using this tester.



    import java.text.*;
    import java.util.*;
    import java.io.*;...
  6. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Hmmm.. after changing that it seems to work alright with the small file, however with the bigger one I get an error:

    java.lang.ArrayIndexOutOfBoundsException: -48
    at...
  7. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Aha! I see, so by the looks of that its skipping every other one with calculating percent, because of:



    public void setPercent()
    {
    for (int c = 0; c < 26; c++)
    {
    percent[c]...
  8. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    I chose to go the route of setting up that method as setOccurance() and making it void and using a getOccurance() method to return it to print. That works fine, at least it seems to. The problem...
  9. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    *Facepalm* That was a dumb mistake. Thanks! I didnt realize what was going on there!
  10. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Thats confusing... I only call getOccurance() once, and the elements should only be getting incremented when they match the char that c is set as. Thats what [c - 'a'] does, correct?
  11. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Welllllll I ran into an issue :/ It's not counting right. I get like 114 s's when there is only 59 letters, and that doesnt make sense to me. Ill post the code. You'll see that I've also added...
  12. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Thank you soooooo much! It works perfect now! You have taught me a lot with this! Much love! <3
  13. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Alright, well i'll start by saying that I tried to write this program once before, when I ran into problems, my instructor advised me to rewrite the entire program. So I did. And I made it much...
  14. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Wow, that makes a lotttt of sense! Thanks for the help! I attempted what you suggested, and I think I did it right, however I now get an error when trying to make a substring of the string. I have no...
  15. Replies
    28
    Views
    3,073

    [SOLVED] Re: Cant find stupid bug.

    Alright, I edited it. I did test the methods prior to posting. The countLetters() method is not relevant to this part of the code, but I included it anyway as to prepare for what I have to do when I...
  16. Replies
    28
    Views
    3,073

    [SOLVED] Cant find stupid bug.

    So, ive had this problem before, but I cant seem to find the culprit this time. Its a really large project I have to do and I'm stuck on the first part. So for now, we'll just say that all its...
Results 1 to 16 of 16