Search:

Type: Posts; User: mstabosz

Page 1 of 5 1 2 3 4

Search: Search took 0.15 seconds.

  1. Re: How to determine value after nested for loop

    I'm trying to kill some time while waiting for my DVR to catch up so I don't have to sit through commercials, so here is an unusually thorough answer.
    -----

    Where did you get the answer of 9?
    ...
  2. [SOLVED] Re: Trying to write a servlet, keep getting 404 errors in web browser.

    Disregard (dunno if anyone read this). I figured this out. Turns out you can only have one WEB-INF within a folder no matter how many different other folders within that folder.
  3. [SOLVED] Trying to write a servlet, keep getting 404 errors in web browser.

    Hey guys,

    I'm usually pretty good with this stuff, but Servlets are kicking my ass. The logic all seems straightforward enough, but I can't figure out the environment.

    Here's my setup: running...
  4. Re: Creating a static method that requires no arguments and returns no values.

    You shouldn't call a function outside the body of a function (which you did on line 3). You've also left your main function completely empty so your program won't do anything.

    Also, don't put a...
  5. Re: Creating a static method that requires no arguments and returns no values.

    That 2nd try is a little closer, but that call to displayinfo(); is just sorta hanging out in the top of the class where the variables and method definitions go. There's no way to reach it and I...
  6. Re: How do I just read a users input back out to them?

    Your code looks okay but it's all out of order. You're sorting the array, then printing it twice after the sort. When you run the array through that sorting loop, you're completely changing the...
  7. Re: i need someone to please help me with this java assignment, i am taking it this semester

    What do you have so far?

    Try working out this problem on pen and paper if you need some help figuring out the logic and how to begin. If you have some specific questions on Java syntax or are...
  8. Replies
    6
    Views
    197

    [SOLVED] Re: how convert everthing to private

    You shouldn't have your package declaration inside the body of a class. Also you shouldn't have it twice.

    To change things to private, just precede them with the private keyword instead of...
  9. Replies
    4
    Views
    176

    Re: Need Homework Help Please

    Do you know how to declare variables?
    Do you know how to assign values to them?
    Do you know how to take in input from the user?
    Do you know how to do math operations? How would you go about...
  10. Replies
    4
    Views
    273

    Re: Question on While Loops

    Like they said, you gotta remove the semicolon. But even when you do that, your code will probably not have the result you intended. It should go from printing out the number "1" to having no...
  11. Replies
    4
    Views
    224

    Re: Help in java code

    I've been studying web development too. I pick up the back end stuff pretty quickly but front end always gives me trouble. HTML and CSS aren't really tough but I feel like good front end stuff...
  12. Re: Socket program that worked in the past no longer working, cannot open socket.

    Ok. Attaching a simple WindowListener got this all working correctly. I'm not crazy about the clutter caused by the 6 other methods the interface requires me to implement, but it is what it is. ...
  13. Replies
    5
    Views
    368

    Re: NullPointerException on JButton.setIcon.

    Ok got it working. Thanks Norm and Copeg.
  14. Replies
    5
    Views
    368

    Re: NullPointerException on JButton.setIcon.

    I thought the statement JButton[] handButton = new JButton[13]; instantiated them. I guess I was wrong. I always screw up with object array. Blech. So I oughtta throw something like handButton[i]...
  15. Replies
    5
    Views
    368

    NullPointerException on JButton.setIcon.

    Wasn't sure which subforum to put this in. It feels like it crosses a couple different aspects of Java.

    So I have these two classes that I wrote a few months back. The Card class represents a...
  16. Re: Socket program that worked in the past no longer working, cannot open socket.

    Hmm. Is there a better way? The System.exit(0) statement is inside that catch block. If it hits that, there are no other statements to execute, so it wouldn't do anything. But if I got rid of the...
  17. Re: Socket program that worked in the past no longer working, cannot open socket.

    Hmmm...

    Earlier today tried the May export and the (newer) October export on a third computer and they both worked. Just now tried both on this computer, and they both worked. Then closed them...
  18. Re: Socket program that worked in the past no longer working, cannot open socket.

    XAMPP I think is only using 80 and 443. But I changed around to some other arbitrary port numbers and still got the same thing. Netstat doesn't show port 10,000 as being in use, so you're probably...
  19. Re: Socket program that worked in the past no longer working, cannot open socket.

    Ooof. Forgot I posted this, and been too busy to reply back. Sorry about that.



    You only need the server portion, which I've pasted above, to see the problem. There's an Address class...
  20. Socket program that worked in the past no longer working, cannot open socket.

    I wrote this program back in May that makes use of networking. It's a smallish program that is comprised of 2 parts, a client and a server. The server just receives information from a single...
  21. Re: My code is skipping my for loop altogether and ignoring my array input.

    No, but it's a lot more reliable than using ==

    I think that == sometimes works with Strings but not always so you shouldn't count on it.

    You can also use .compareTo() and...
  22. Re: Did you ever find yourself unable to solve what should be a simple programming problem?

    Indeed. For this particular problem, I left my computer and went off to the gym for my daily exercise, a process which takes about 90 minutes (30 minutes travel to and from the gym, and an hour on...
  23. Replies
    5
    Views
    447

    Re: Java test questions

    Number 1 looks like a good candidate for recursion, since it involves factorials. But you can probably do it with a for loop that counts down. In a nutshell, the question is asking: "If given the...
  24. Replies
    4
    Views
    212

    Re: help me please

    Well, a submit button, on something like a GUI, would be added as a JButton object. JButton jbtSubmit = new JButton("Submit"), then use the add() method in the JFrame class to add that to a frame. ...
  25. Re: how to solve this question ? please help me

    The output depends on the input. If you wrote this, then gave a height and width of 4, you would get an area of 16 for the square and 8 for the triangle.
Results 1 to 25 of 107
Page 1 of 5 1 2 3 4