Search:

Type: Posts; User: DOLZero

Search: Search took 0.08 seconds.

  1. Replies
    12
    Views
    1,316

    Re: Casting error using String with generics

    I found another way to get around the problem I had. It's more of a bandaid fix as I still have an issue with casting, but I can at least get the String value I want now and create a new ListNode...
  2. Replies
    12
    Views
    1,316

    Re: Casting error using String with generics

    Exception in thread "main" java.lang.NumberFormatException: For input string: "comedy"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at...
  3. Replies
    12
    Views
    1,316

    Re: Casting error using String with generics

    I tried running the line you wrote for the scanner and got an error when I tried to compile the program. I am fairly certain that the initial error that is causing me problems has to do with trying...
  4. Replies
    12
    Views
    1,316

    Re: Casting error using String with generics

    All that I have entered for user input is "a comedy" and "1". The rest is output from the program.

    Should I modify the following line to match what you typed in?


    Scanner stdin = new...
  5. Replies
    12
    Views
    1,316

    Re: Casting error using String with generics

    I think I get what you are saying. In situations where there are no items in the list, it will try to getNext() when there is no item to get. I will see about how I can fix this.

    @Norm: Here is...
  6. Replies
    12
    Views
    1,316

    Casting error using String with generics

    I'm getting a bug with this program I am writing for my CS class. Pretty much got it nailed down to a casting error. It happens when I try to retrieve a value from a node in an existing list...
Results 1 to 6 of 6