Search:

Type: Posts; User: dubois.ford

Search: Search took 0.20 seconds.

  1. Replies
    0
    Views
    2,887

    Recursion for N Queens problem

    Hi all,
    I have code that find the solution to a N-queens problem by starting at the upper left hand corner of the board and works its way through the rows and columns. However, I would like to...
  2. Replies
    1
    Views
    2,023

    Using a Generic Insertion Sort method

    Hello,
    I am having a real hard to trying to figure out how to use generics

    I have the following insertion sort method defined


    public static <T extends Comparable<? super T>> void...
  3. Replies
    1
    Views
    1,410

    Print out object that is in a tree

    I am trying to print out the object in a tree. I have a toString method defined for the object. However, I get this error:

    I get a classCastException

    Exception in thread "main"...
  4. Replies
    5
    Views
    6,526

    Re: Expanding the capacity of an array

    Thank you for the replies.
    myCharFreqNode is the type of an object I created. It is declared like this in main



    charFreqNode mycharFreqNode[] = new charFreqNode[2];


    The class definition...
  5. Replies
    5
    Views
    6,526

    Expanding the capacity of an array

    Hello all,
    I declare an array of objects with a default capacity of 2 and I am trying to expand capacity once the limit is meet. I am calling the "expandCapacity" method which creates a new array of...
  6. Writing data to the java DefaultTableModel

    Hello all,
    I am attempting to write a program that will read the characters of a text file one by one and keep the count of the number of times each character appears. I would like to use the table...
  7. Replies
    2
    Views
    2,101

    Re: Generic method using an int[] argument

    Thanks that solved it.
  8. Replies
    2
    Views
    2,101

    Generic method using an int[] argument

    Hello,
    I have the following generic function declared.
    public static <T extends Comparable<? super T>> void selectionSort (T[] data)

    However eclipse will not compile saying:
    The method...
  9. Replies
    3
    Views
    7,036

    [SOLVED] Re: Writing integers to a file

    Thanks that solved it. So the BufferedWriter wrtie(int c) method tries to look up the corresponding ASCII value of the int?
  10. Replies
    3
    Views
    7,036

    [SOLVED] Writing integers to a file

    Hello,
    I am simply trying to print a random integer to a text file. However when I open up the text it just shows= square shapes and not the numbers. I attached the .txt file


    public void...
  11. New person Just trying to read a file of ints

    Hello,
    I am trying to read a simple .txt file of ints into a 2D array. However, the scanner object seems to skip the first few ints. The "scanner.hasNext()" seems to advance the scanner. Please let...
Results 1 to 11 of 11