Search:

Type: Posts; User: Norm

Page 1 of 20 1 2 3 4

Search: Search took 0.16 seconds.

  1. Re: Why System.in returns -1 when I pressed "Enter key" how can I mimic "Enter key" in console?

    Did you look at the PipedInputStream and PipedOutputStream classes?
  2. Replies
    2
    Views
    235

    Re: How to check if a calculation is an integer

    Look at the modulus operator.
  3. Re: Why System.in returns -1 when I pressed "Enter key" how can I mimic "Enter key" in console?

    Read the API doc for the getNumericValue method to see when it returns a -1.
    A better way to see what is in the read variable: Integer.toHexString(read)
    or String.valueOf(read)
  4. Replies
    2
    Views
    201

    Re: Neural Network method not working

    Please explain what backpropagation means. It is not a normal java programming term.

    Please edit your post and wrap your code with code tags:



    **YOUR CODE GOES HERE**


    to get...
  5. Thread: Leap year

    by Norm
    Replies
    19
    Views
    286

    [SOLVED] Re: Leap year

    Thanks for sharing your solution.
  6. Thread: Leap year

    by Norm
    Replies
    19
    Views
    286

    [SOLVED] Re: Leap year

    What classes and methods did you use?
  7. Thread: Leap year

    by Norm
    Replies
    19
    Views
    286

    [SOLVED] Re: Leap year

    What have you tried?
    Do you know how to write a loop? Start with that. Have a year value (eg 2012) that is 10 years old and increment it until its value is this year (2022).
  8. Thread: Leap year

    by Norm
    Replies
    19
    Views
    286

    [SOLVED] Re: Leap year

    Can you make a loop that starts with a year that is 10 years old and increments it by one year until its value is the present year?
  9. Thread: Leap year

    by Norm
    Replies
    19
    Views
    286

    [SOLVED] Re: Leap year

    Ok, the posted code can detect a leap year.
    Now there needs to be a loop to cover the last 10 years.
  10. Replies
    1
    Views
    184

    Re: Generics solve as one function but not two

    Try asking on this forum: http://www.coderanch.com/forums
    there are many moderators there that know generics.

    Posted here:...
  11. Thread: Leap year

    by Norm
    Replies
    19
    Views
    286

    [SOLVED] Re: Leap year

    Ok, that sounds like the code needs a loop for the last 10 years
    and a way to select the high years. What is a high year?
  12. Re: I want print the number which leaves remainder 0 . For example: if 8 is enter I want output 1248 . Tell me where I'm making mistake

    What problems are you having?

    Do you have the steps the program needs to take to solve that problem? The algorithm

    Can you post the steps the program needs to take?

    How are you debugging...
  13. Thread: Leap year

    by Norm
    Replies
    19
    Views
    286

    [SOLVED] Re: Leap year

    Ok, what class(es) are you allowed to use?
    What is wrong with the class and method used in the first post? It uses a class from the java.time package.
  14. Thread: Leap year

    by Norm
    Replies
    19
    Views
    286

    [SOLVED] Re: Leap year

    I do not see a class called Time in that package. Is Time the correct name?
    What package is the Time class in that your teacher wants you to use?
  15. Thread: Leap year

    by Norm
    Replies
    19
    Views
    286

    [SOLVED] Re: Leap year

    Sorry, I do not see a class named Time in the java.time package. Are you sure that is the correct package?

    What version of the JDK are you using?
  16. Thread: Leap year

    by Norm
    Replies
    19
    Views
    286

    [SOLVED] Re: Leap year

    What package is the Time class in?

    What have you tried?
  17. Replies
    7
    Views
    312

    Re: for(int x = 0; x

    To get that output: 0,1,2,3 there would need to be
    a "," printed after every number
    and the print() method used instead of the println() method which ends the line that is printed and moves to...
  18. Replies
    7
    Views
    312

    Re: for(int x = 0; x

    If ' ' has a value of 32
    then 0 + 32 is 32
    ...
    then what is 9 + 32?


    Then why is the ' ' included in the println call?
  19. Replies
    7
    Views
    312

    Re: for(int x = 0; x

    The compiler treats the char ' ' as a integer value and adds its value to x.
    If you want a space at the end of the line use " ". But why do you want to add a space at the end of a line?
  20. Re: How Java handles and simulates ANSI keycode input in console?

    I'm not sure what that means.

    Here is a test:
    Add this statement first thing in the main method:

    try{Thread.sleep(5000); }catch(Exception x) {} // wait so focus can be set
    Change...
  21. Re: How Java handle and emulate Ansi keycode input in console?

    Sorry, I do not have Linux and do not know what the OS does when a program is executed in a command prompt window on that system.
    What do you see in the window when the program is executed?

    Here...
  22. Re: How Java handle and emulate Ansi keycode input in console?

    Can you describe how you ran your test?
    How many windows were open?
    Where was the focus when you ran the program?
    Where did you enter the java command to execute the program?
  23. Re: How Java handle and emulate Ansi keycode input in console?

    Did you try writing a console program that used the Robot class?
  24. Thread: Compare strings

    by Norm
    Replies
    4
    Views
    241

    [SOLVED] Re: Compare strings

    What are the conditions for the code to return a 0?
    What are the conditions for the code to return a 1?
    Given answers to those two questions, work on the code to do it.
  25. Thread: Compare strings

    by Norm
    Replies
    4
    Views
    241

    [SOLVED] Re: Compare strings

    Did you look at the String class to see if it has any methods that do what you want?

    Please edit your post and wrap your code with code tags:



    **YOUR CODE GOES HERE**


    to get...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4