Search:

Type: Posts; User: mspray

Search: Search took 0.21 seconds.

  1. Thread: What's wrong?!

    by mspray
    Replies
    6
    Views
    1,009

    Re: What's wrong?!

    Well if I am following your code correctly the reason why your delrep() only deletes the first occurence is because there is nothing telling it to continue deleting after the first occurence.
  2. Replies
    2
    Views
    1,053

    Re: Sorting an Array

    You can also use the sort(T[] a, Comparator<? super T> c) Sorts the specified array of objects according to the order induced by the specified comparator. I believe this will do what you want and it...
  3. Replies
    16
    Views
    10,097

    Re: ArrayList Problem

    The only thing I would add to this is to put the random generator into a function/method so that you can continually recall the random function.You could even put the whole thing into a while loop...
  4. Replies
    2
    Views
    529

    Re: Problem to organize my code in classes

    Actually your idea of seperating your classes by GUI and general is correct. I would have the GUI class extend the general class. This just allows you to make changes to the GUI class without having...
  5. Replies
    2
    Views
    872

    Re: Need help with assignment

    Yes this definitely worked for me, so all you would have to do is adapt this little bit of code to your use.



    int[] myArray = {1, 2, 3, 6, 8, 20, 25, 36, 39};
    int position =...
  6. Replies
    2
    Views
    872

    Re: Need help with assignment

    you may be able to use the binary search function "public static int binarySearch(short[] a, short key)" short[] a is the array to search in and short key is the value to search for. The only catch...
  7. Replies
    4
    Views
    6,652

    Re: for loop and while loop problems

    Here is a total solution incase you are still having difficulties



    public class Main {

    /**
    * @param args the command line arguments
    */
    public static void main(String[]...
  8. Replies
    0
    Views
    383

    Hello Fellow Programmers

    Hello Java community, I am an intermediate to advanced java programmer. I learned my programming by programming C++ and python. I look forward to going through the forums and helping and learning.
Results 1 to 8 of 8