Search:

Type: Posts; User: Norm

Page 1 of 20 1 2 3 4

Search: Search took 0.66 seconds.

  1. Re: want to modify code that converts binary code to decimal numbers

    You're using boolean expressions in the while statement and if statements.
    X == 2 is a boolean expression. It resolves to a boolean value of true or false.
    ((x == 2) && (y > 3)) is (what I call) a...
  2. Replies
    13
    Views
    146

    Re: Help with a client server program

    What happens with multiple clients?

    This size of code requires execution to see if it works. Too big to just use the eyeball.
  3. Re: want to modify code that converts binary code to decimal numbers

    I was talking about the boolean expression inside the ()s that's part of the while statement.
    What I said would also be true of the condition expression used in an if statement or anywhere else a ...
  4. Thread: TreeMap:

    by Norm
    Replies
    5
    Views
    49

    Re: TreeMap:

    You don't compare them. The TreeMap class code does that.

    Did you read the API doc for the TreeMap class?
  5. Thread: TreeMap:

    by Norm
    Replies
    5
    Views
    49

    Re: TreeMap:

    Read the API doc for the put() method. It says it will throw that exception if the node being added cannot be compared. That would mean the class needs to implement Comparable.
  6. Re: want to modify code that converts binary code to decimal numbers

    You need to think about how the OR operator (||) works. If either of the sub conditions are true, then the whole condition is true. With the AND operator (&&) all sub conditions must be true for...
  7. Re: Whats wrong with my code? Why isn't my minimum working? Thanks.

    A trick when searching for max and min values is to initialize the variables with extreme values. Make min the largest possible value and max the smallest.
  8. Replies
    13
    Views
    146

    Re: Help with a client server program

    I don't see how the posted code works without using an accept().
    Here's a idea of how it could work:
    server defines serversocket
    begin loop
    server calls accept() and waits for connect
    client...
  9. Replies
    13
    Views
    146

    Re: Help with a client server program

    Where is the accept() method to wait for incoming connections?
  10. View Post

    Have you checked that the port was not in use before starting your program?
    Could your program try to use the post more than once?
  11. Thread: Compiler

    by Norm
    Replies
    5
    Views
    103

    Re: Compiler

    It's a programming language for implementing algorithms to run as a computer program.
  12. Replies
    1
    Views
    85

    Re: querying xml and json

    Moved from Introductions section.
  13. Replies
    13
    Views
    146

    Re: Help with a client server program

    I think that is possible.

    I'm not sure what a WAR file is for. Do server hosting sites require that?

    Your testing server code sounds like it needs a redesign. The accept logic should start a...
  14. Replies
    2
    Views
    71

    Re: jdk 8 installation problem

    Moved from Introductions section.
  15. View Post

    Has the program been executed more than once? Has the first execution stopped completely before the second one has started?
  16. Thread: Hi guys

    by Norm
    Replies
    1
    Views
    58

    Re: Hi guys

    Moved from Introduction section.

    That looks like a (poorly formatted) homework assignment. It'd be easier to read if the line-ends were in the right place.

    What have you tried?
    Where are...
  17. Replies
    13
    Views
    146

    Re: Help with a client server program

    That sounds like a description of a protocol like http. With your own server you can define your own protocol.
  18. Re: Is it possible to add only String and Integer to ArrayList(Must be generic) by using JAVA GENERICS

    If two different types are in the arraylist, how will the code know which type is returned by the get() method?
  19. Replies
    2
    Views
    91

    Re: java package problem

    Where is the package mtv located when you compile the program? Can the javac program find it?
    Is its definition on the classpath?

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

    ...
  20. Thread: Guessing game

    by Norm
    Replies
    3
    Views
    96

    Re: Guessing game

    A comment makes the programmer's intentions clearer.
  21. Thread: Guessing game

    by Norm
    Replies
    3
    Views
    96

    Re: Guessing game

    Comments:
    Window and Number are the names of a Java SE classes. It'd be better to use other names
    Java naming conventions are that variable names start with lowercase letters.
    There isn't a test...
  22. Replies
    6
    Views
    140

    Re: need help printing hourglass shape

    Please explain what the problem is.

    For the 3 lines you've shown:
    set cnt=3
    set change to -2
    print cnt Qs
    cnt = cnt + change
    print cnt Qs
    now set change to +2 -> to add 2 to cnt instead of...
  23. Replies
    6
    Views
    140

    Re: need help printing hourglass shape

    Can you explain what the problem is printing the third line? For that simple example the third line is the same as the first line.
    Look at the post#3. Think about how the line lengths shorten and...
  24. Re: Java program to find the index of the greater element whose value is sum of the remaining elements

    The number of numbers will not be a problem if the numbers are stored in a list or array and loops are used to look at the numbers.
  25. Replies
    3
    Views
    85

    Re: Sending an xml file to event handler

    What have you tried?
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4