Search:

Type: Posts; User: Norm

Page 1 of 20 1 2 3 4

Search: Search took 0.53 seconds.

  1. Replies
    18
    Views
    139

    Re: How can I get it to switch sides?

    System.out.printf("\t\t%2d\t%8.3f |\n", miles,kilometers);

    The \n after the | starts a new line for the output.
    Remove the \n from that line
    add code immediately after that statement to:
    ...
  2. Replies
    11
    Views
    140

    Re: Titles missing from interest rate chart?

    Please post the program's current out that shows what you are talking about. Add some comments to show what you want.

    There are a couple of ways to control the number of decimal points:
    use the...
  3. Replies
    3
    Views
    43

    Re: Can't figure out what's wrong

    Sorry, I can't see the red lines from here.
    Can you use a compiler that creates error messages that can copied and pasted here?
  4. Replies
    3
    Views
    49

    Re: Hello elloh llohe lohel ohell hello

    @GoodbyeWorld Yes, I see that but it's important that the OP see it and describe it before he can write code to do it.

    Part of writing a program should be to document what it does. Most students...
  5. Replies
    3
    Views
    43

    Re: Can't figure out what's wrong

    Do you have any specific questions about your assignment?

    One part of doing an assignment is figuring out what is required.
    Another part is designing a program to do what is required.
    And...
  6. Replies
    18
    Views
    139

    Re: How can I get it to switch sides?

    Please post the current version of the code if you want to continue working on it.
    To print serveral items on one line:
    print(x)
    // the line now has x
    print(y)
    // the line now has x y...
  7. Replies
    2
    Views
    49

    [SOLVED] Re: Set method to static?

    What method in what class are you trying to call?

    To call a non-static method in a class you need a reference to an object of that class to call the method:

    SomeClass aRef = new SomeClass(); ...
  8. Replies
    3
    Views
    49

    Re: Hello elloh llohe lohel ohell hello

    Do you have the rules for creating the desired output?
    The first two lines look the same. From the third line down they look different.
    What rule defines what the output should be?

    Please...
  9. Replies
    13
    Views
    88

    Re: getting an object from a hashMap:

    I was requesting that code be posted here that could be used for testing.
  10. Replies
    13
    Views
    88

    Re: getting an object from a hashMap:

    Can you make a small, simple program that compiles, executes and shows the problem for testing?
  11. Re: How could I implement a FOR loop in this piece of code?

    The common test in all the if statements: gameID == 1 could be moved to a single if that includes the other parts of the tests instead of repeating it in each if.
  12. Replies
    4
    Views
    70

    Re: Random dice roller game help please

    Can you define what you mean? what is a pair? a triple? Please give an example.
  13. Replies
    13
    Views
    88

    Re: getting an object from a hashMap:

    Looks like its time for more debugging.
  14. Replies
    13
    Views
    88

    Re: getting an object from a hashMap:

    Try doing some debugging to see where the values are go.
  15. Replies
    13
    Views
    88

    Re: getting an object from a hashMap:

    What key should the get() method use to retrieve the desired array from the HashMap?
    Where is that key located?


    If vehiclesData is an array, you need an index in []s to get a Vehicle object out...
  16. Replies
    13
    Views
    88

    Re: getting an object from a hashMap:

    The object to the right of the : must be one of the above.
  17. Thread: Read web page

    by Norm
    Replies
    4
    Views
    56

    Re: Read web page

    You could look at the URLConnection and HttpURLConnection classes for methods that could be used to read the contents of a web page. You'll need to do some research to see how to use them.
  18. Re: How could I implement a FOR loop in this piece of code?

    loops are used for repeating a task. What is there about what the program is supposed to do that needs to be repeated?

    Are the numbers that are read the indexes into the arrays
    or do the arrays...
  19. Thread: Read web page

    by Norm
    Replies
    4
    Views
    56

    Re: Read web page

    Read the contents of the web page into a String and use one of the String class's methods to search.
    Getting the line and column won't be possible doing it this way.
  20. Replies
    31
    Views
    232

    Re: What I hope is a quick question

    Ok, I guess you are making progress.
  21. Replies
    8
    Views
    127

    Re: Need help with a parking fees code

    Thread closed.
  22. Replies
    8
    Views
    127

    Re: Need help with a parking fees code

    @d2idan That post to the other site was after you had received responses here that required some action on your part.

    Have you finished using this site? Should your post and id on this site be...
  23. Replies
    31
    Views
    232

    Re: What I hope is a quick question

    If the program is still running, then it's in a loop and not stopped. Check all the loops to make sure none are looping forever. If you can't tell what a loop is doing, add a println() to it. The...
  24. Replies
    31
    Views
    232

    Re: What I hope is a quick question

    You left off the code for the catch block. What happens in the catch block if there is an exception?
    At a minimum there should be a call to the printStackTrace() method to give a full description...
  25. Replies
    8
    Views
    127

    Re: Need help with a parking fees code

    Can you copy the full contents of the command prompt window from when you execute the program and paste it here to show what you are talking about? Add some comments where the output is not what you...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4