Search:

Type: Posts; User: andreas90

Search: Search took 0.09 seconds.

  1. Replies
    38
    Views
    8,382

    [SOLVED] Re: Char Array Increment + 1

    I am a beginner too. The only advise i can give you is write down the logic of your program and make a design of it before you try to implement it. I didn't do that when i first started java...
  2. Replies
    38
    Views
    8,382

    [SOLVED] Re: Char Array Increment + 1

    Why are you using a nested loop? What do you need the loop that goes through Alphabet? I think that you will get what you want by removing the inner for loop but are you having (and writing...
  3. Replies
    38
    Views
    8,382

    [SOLVED] Re: Char Array Increment + 1

    I suggested you to use result not i as an index.
  4. Replies
    38
    Views
    8,382

    [SOLVED] Re: Char Array Increment + 1

    Instead of printing result you can use result as an index in the Alphabet array and print the element in the specified index.
  5. Replies
    38
    Views
    8,382

    [SOLVED] Re: Char Array Increment + 1

    What if you assign "value" the charAt(int) method of the String the user inputs and then do the binarySearch with it - both inside the for loop?
  6. Replies
    38
    Views
    8,382

    [SOLVED] Re: Char Array Increment + 1

    You do that with your for loop if i'm getting it right.

    Check out the charAt(int) method of the String class. You can use it inside the for loop as value.
  7. Replies
    38
    Views
    8,382

    [SOLVED] Re: Char Array Increment + 1

    result should be -1 as you mentioned in post #16. result +1 = -1+1 = 0
    Am i missing something?
  8. Replies
    38
    Views
    8,382

    [SOLVED] Re: Char Array Increment + 1

    What does it do instead?
  9. Replies
    38
    Views
    8,382

    [SOLVED] Re: Char Array Increment + 1

    Take a look at here
  10. Replies
    38
    Views
    8,382

    [SOLVED] Re: Char Array Increment + 1

    Hello Nuggets!
    Why are you using FileReader to read from the console? In my opinion you are using way too much code for just asking the user for input.
    And also, as i can see you have in your for...
Results 1 to 10 of 10