Search:

Type: Posts; User: mstabosz

Page 1 of 5 1 2 3 4

Search: Search took 0.26 seconds.

  1. Re: I have a bit of a design question about 4 methods common to 2 classes.

    Hmmmm. Did a little research on Delegation. Hard to follow, and it seems a little convoluted. I'll give it a shot.
  2. Re: I have a bit of a design question about 4 methods common to 2 classes.

    Ooh I read up on delegation somewhere not too long ago. From what I remember it was kind of a wild concept but interesting. Thanks for the lead.
  3. I have a bit of a design question about 4 methods common to 2 classes.

    So I'm writing these servlets (important detail). It's supposed to handle logins for a fictional banking system. I have 4 methods: checkApprovalStatus(), showApprovedStatus(), showDeclinedStatus(),...
  4. 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?
    ...
  5. [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.
  6. [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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. Replies
    6
    Views
    235

    [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...
  12. Replies
    4
    Views
    206

    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...
  13. Replies
    4
    Views
    304

    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...
  14. Replies
    4
    Views
    277

    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...
  15. 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. ...
  16. Replies
    5
    Views
    400

    Re: NullPointerException on JButton.setIcon.

    Ok got it working. Thanks Norm and Copeg.
  17. Replies
    5
    Views
    400

    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]...
  18. Replies
    5
    Views
    400

    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...
  19. 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...
  20. 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...
  21. 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...
  22. 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...
  23. 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...
  24. 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...
  25. 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...
Results 1 to 25 of 110
Page 1 of 5 1 2 3 4