Search:

Type: Posts; User: Dragonalas

Search: Search took 0.23 seconds.

  1. Re: Why do I get an exception in this simple loop?

    Like jps said, you're taking the number of the last element in your string, and adding 1 to it. You can solve this by simply saying either:

    for(int i = 0; i <= str.length() - 1; i++)

    or the...
  2. Thread: Converting?

    by Dragonalas
    Replies
    3
    Views
    282

    Re: Converting?

    First of all, you can't switch doubles. In Java, you can only switch whole numbers (i.e. int). When trying to switch a double or a float or even a String you'll get errors. You can solve this by...
  3. Re: Counting and comparing elements in an array

    Maybe you should think about this logically:

    You need to count the amount of zeros, ones and twos in an array, and then find out which has the biggest count, correct?

    Then I'll give you a...
Results 1 to 3 of 3