Search:

Type: Posts; User: Norm

Page 1 of 20 1 2 3 4

Search: Search took 1.24 seconds.

  1. Thread: Valid Ticket

    by Norm
    Replies
    2
    Views
    3

    Re: Valid Ticket

    One problem I see is the formatting of the code. The {s and }s are not properly placed making it hard to see the nesting logic.
    If you format the code, you might see the problem with the logic.
  2. Replies
    6
    Views
    7

    Re: Why is if statement false?

    Yes.
  3. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    You need to compute the values before you can display them.
    For testing you can use the println() method/
    When all the values have been computed, then worry about how to display them.
  4. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    What are you asking about?
  5. Replies
    6
    Views
    7

    Re: Why is if statement false?

    Because == doesn't compare the contents of an object.
  6. Replies
    6
    Views
    7

    Re: Why is if statement false?

    You should use the equals() method to compare String objects, not the == operator.
  7. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    Start with the next step after the total has been computed.
    Is that compute the average? Given the total, what else does the code need to have to compute the average?
  8. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    For example print out the value of total after it has been computed:

    System.out.println("total="+total);

    What should the program do next after it has computed the total?
  9. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    Now you need to learn how to debug the code. I use the println() method to print out the values of variables as the program executes so you can see what the computer sees when it executes the...
  10. Re: Delimiter function and number of words in string

    Look at the Scanner class to see if it has any methods that read in a single character.
    If you can't find any, then you will have to read the input as a String.
  11. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    That is not allowed. Methods can not be nested one inside of another.

    Methods in a class must be peers.

    Look at the tutorial for how to code methods:...
  12. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    A call to a constructor MUST use the exact same number and type of arguments that are shown in the definition. There can be more than one constructor, but the call to the constructor must match one...
  13. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    You need to copy the error message exactly so it is correct and complete. What you posted has a misspelling: founr that shows you typed it instead of copying it. You left off the ^ which is...
  14. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    There must be an error message printed on the console somewhere that you need to copy the full text of the error message and paste it here so we can see it.
  15. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    Either make numOfGrades static
    or create an instance of the class and use the reference to that instance to call its method.


    copy the full text of the error messages and paste it here.
  16. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    Please copy the full text of the error messages and paste it here.
  17. Thread: Syntax error!!!

    by Norm
    Replies
    23
    Views
    24

    Re: Syntax error!!!

    Did you have a question?
  18. Replies
    7
    Views
    8

    Re: Will not average for high temp

    I use the println method to print values on the console:


    System.out.println("aH1="+aveHigh1); // show variable's value

    Add the above after the line that computes the value.
    Do the same...
  19. Replies
    7
    Views
    8

    Re: Will not average for high temp

    Try debugging the code by adding some println statements to the code where the value is computed. Print out the values of all of the inputs and the values of all the intermediate results so you can...
  20. [SOLVED] Re: Help with Multi-dimensional Arrays. Help needed urgently!

    Glad its working for you now.
  21. Thread: Binary Trees:

    by Norm
    Replies
    13
    Views
    14

    Re: Binary Trees:

    Look at the printf() statement on line 91. The JVM does not like the format String: java.util.UnknownFormatConversionException: Conversion = 'i'
  22. [SOLVED] Re: Help with Multi-dimensional Arrays. Help needed urgently!

    sumColumn() should need only one loop to go down the rows and add the values in the selected column.

    In the sumMajorDiagonal() method, What are the elements that should be summed to get the value...
  23. Thread: Binary Trees:

    by Norm
    Replies
    13
    Views
    14

    Re: Binary Trees:

    I suggested that the method NOT return a tree. User's should NOT have to know about tree objects.
    Either return the value in the node or true/false.
  24. Thread: Binary Trees:

    by Norm
    Replies
    13
    Views
    14

    Re: Binary Trees:

    Is that the full text? It looks like it is missing the first line(s). Look at line 74 and find what has the null value.


    The inner class should be kept a secret. search() should return true or...
  25. Replies
    7
    Views
    8

    Re: Will not average for high temp

    Can you copy the output and post it here that shows what the code outputs?
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4