Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    Glad you figured it out.
  2. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    What is the statement that throws the NPE? You need to find the variable with null value!!!

    What is the value of indata when the code in post#20 is executed?
  3. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    What is the value of the val variable? That is the only thing that would cause a NPE with statement you posted.
  4. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    What is the code at the line where the exception occurs?
    Can you post the full text of the error message.

    Edit your post and change the tags to
    <YOUR CODE HERE> to get highlighting
  5. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    You get to the elements of an array by using an index value inside of []s
    words[0] is a reference to the first element in the words array.

    The elements of an array are items of the same class as...
  6. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    Add some printlns to the code to show the value of variables as they are set and changed.
  7. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    The words array now has the split strings in it. You will need a loop to get them out one by one and do the conversion on each of them.
  8. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    How did you use the split method? It returns an array that you must then go into to get the strings that were split from the original string.
  9. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    After you have read in the String that you want to split.
  10. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    You need to get the individual words from the String so you can work on them one by one.
    Then you can change them and build a new String with the changed words.
    The String class has methods to...
  11. Replies
    22
    Views
    1,790

    Re: new to java, and need help with assigment

    Can you post the output from when the code does not work that shows the problem.
    Add comments saying what is wrong with the output and show what the output should be.
Results 1 to 11 of 11