Search:

Type: Posts; User: Helplessdrowningpuppy

Search: Search took 0.28 seconds.

  1. [SOLVED] Re: problem with dequeue of a queue implemented using circular singly linked list with no tail reference

    In the one I posted above there was no tail reference in my list. It was circular so current.next.next pointing to head would mean the one in front of current was the last one on the list, as the...
  2. [SOLVED] Re: problem with dequeue of a queue implemented using circular singly linked list with no tail reference

    Initially I thought if I deal with the cases like empty list singleton or double, it would lessen the chance of any mysteryerrors, I rewrote the dequeue to be more compact and from making a trace (ie...
  3. Re: declare two dimensional array in java

    If you want you could create an array of a certain size , and if that fills up have some sort of function that creates an array double the size of the original, copies everything from the original to...
  4. [SOLVED] problem with dequeue of a queue implemented using circular singly linked list with no tail reference

    So I'm trying to build a queue, first in first out, (so add to the head remove from the end) using a linked list for use in another program, I'm having a problem dequeueing where the program seems to...
  5. Replies
    2
    Views
    131

    null pointer error

    So I'm trying to add two numbers using a stack class I made myself. I have a main class with a main method in which I use three stacks on holds one number one holds the other and then I sum one digit...
  6. recursion code seems to keep running with no end (halting problem?)

    hj
  7. [SOLVED] Problem with string split method to string array

    So I'm creating a class which when given three inputs uses them as sides of a triangle and tells ther user what type of triangle it is, or if the input is invalid, tells them why it is invalid. I'm...
  8. [SOLVED] Re: Debugging homework assignment/ questions surrounding partially filled arrays

    Yeah its part of my assignment, we were supposed to read the values from the input file that would fit into the array, and keep a tally of all the values processed so we could output to the console...
  9. [SOLVED] Re: Debugging homework assignment/ questions surrounding partially filled arrays

    We run this program twice with different input files, one of length 6 and one of length 19, but we have to use an array size of 15, to get us used to dealing with partially filled arrays. I used the...
  10. [SOLVED] Re: Debugging homework assignment/ questions surrounding partially filled arrays

    I thought it was that but it turned out I had to put something in for the hasNext() clause. I added a trash variable to hold my input for when it didnt fit the if clause and I got it to work.



    ...
  11. [SOLVED] Debugging homework assignment/ questions surrounding partially filled arrays

    So I'm working on a program that so far

    1) reads a set of numbers from an input file, puts them into an array. The array length is a constant number, but the input file (I run the program twice...
  12. Replies
    4
    Views
    222

    [SOLVED] Re: Problem with I/O

    Not an error in that sense, I'm not getting any error messages, I meant something wrong in my loops logic.

    --- Update ---

    My prof emailed me back, I had a semicolon at the end of my for loop....
  13. Replies
    4
    Views
    222

    [SOLVED] Re: Problem with I/O

    I changed the code a bit, it is writing to the output file now but its still only processing the first line of information. I tried printing controlvariable and it prints as 10 so the loop...
  14. Re: Which Java programming book should a beginner choose ?

    My book for my intro comp sci course is
    http://www.amazon.com/Starting-Out-Java-Control-Structures/dp/0132855836

    it eases you into the api step by step and the programming assignments are really...
  15. Replies
    4
    Views
    222

    [SOLVED] Problem with I/O

    So I'm trying to read 11 values from a text file, each value on a separate line. The first value I use as loop control to run through calculations on the other ten and finally output both the numbers...
  16. [SOLVED] Re: Parsing input from a file using Scanner

    I was tired to the point of mild retardation making this thread, dicdic helped me out with something obvious, so ty, I have another question related to this same program but I'll start a new thread...
  17. [SOLVED] Parsing input from a file using Scanner

    I'm sorry if the thread title is misleading I solved my initial problem but ran into another one. I'm having some kind of weird problem reading input from a file. It says that my scanner object I'm...
  18. [SOLVED] Re: Two questions, 1st having to do with File I/O, second needing advice on how to process contents from an input file

    I fixed up the code for readability, my prof has weird formatting guidelines. The problem still remains that the file isnt being found though. I've tried deleting it and creating a new one with no...
  19. [SOLVED] Re: Two questions, 1st having to do with File I/O, second needing advice on how to process contents from an input file

    Thank you for the tip on the try catch construct, I thought because the file obviously existed I didn't need to put anything in for exceptions but I guess not. When I compile the program now though...
  20. [SOLVED] Two questions, 1st having to do with File I/O, second needing advice on how to process contents from an input file

    So my assignment is to read these values from an input file which I previously created. The 10 values represent miles traveled and I convert them using some formula my prof gave me to get the total...
  21. [SOLVED] Problem with first attempt at using my own classes

    So in the code below I create an instance of my own triangle class and use one of its methods. The thing is I use one of my triangle classes methods in a method other the main method of my main...
  22. Runtime error, illegal argument exception

    So my assignment is

    1)To create file and output ten numbers to said file.
    2)To read as input the numbers in the file and output the # of numbers, average, and total sum
    3)Output results to the...
  23. [SOLVED] Re: Error in absurdly simple code

    solved.. ty
  24. [SOLVED] Error in absurdly simple code

    So this is first post, I'm new to programming in general and am starting with java, using Jrasp as an IDE.

    I was putting together code for my neice as a cool display of my skills lol when I ran...
Results 1 to 24 of 24