Search:

Type: Posts; User: JJeng

Page 1 of 3 1 2 3

Search: Search took 0.51 seconds.

  1. Replies
    7
    Views
    1,484

    Re: Help! Help! Help!

    if equal

    draw
    if any of the lose condition

    lose
    else

    win
  2. Thread: the "WHILE"

    by JJeng
    Replies
    2
    Views
    1,078

    Re: the "WHILE"

    So, this is how I read your snippet.

    variable number1 equals 4
    while number1 is greater than 3
    number1 is a random double from 0 to 1 multiplied by 10 and converted to an int.
    display...
  3. Thread: Array toString

    by JJeng
    Replies
    3
    Views
    1,329

    Re: Array toString

    Use a for loop to increment a variable, this variable is to be used as an index for accessing the array elements, append the array element to a string, loop. All i can say without giving code...
  4. Replies
    6
    Views
    1,669

    Re: Need Help with Null Pointer Exception

    That defines the variable, but where is the assignment?
  5. Replies
    4
    Views
    1,925

    Re: java.lang.NoClassDefFoundError exception

    :/ runs for me. Make sure you name the file correctly? Cap sensitive.
    paste from my console

    C:\sandbox>javac Employee.java

    C:\sandbox>java Employee
    Hello! Welcome to Employee Database
    If...
  6. Thread: help me!

    by JJeng
    Replies
    4
    Views
    904

    [SOLVED] Re: help me!

    You need to set the focus to the JPanel,
    Make it focusable first and then request the focus.

    You may also want to make it so the player stops moving when the keys are released. Unless your...
  7. Replies
    3
    Views
    1,308

    Re: StringBuffer Problem

    :-/ take a peek at java.util.regex?

    edit:
    Nevermind, follow Norm's advice and look at the Java String API
  8. Replies
    3
    Views
    4,703

    Re: Java Multithreading Example - Issues

    Problem recreated as stated from your original post

    suggested Unacceptable Output thread route
    Thread A to .sleep and Thread B to just about to call getInTheCarAndDrive() thread switch and run...
  9. Replies
    6
    Views
    4,910

    Re: Help with Bounded Buffer problem

    In multi-threading you want to thread to exit gracefully. thread.stop() does not do that. Look for the answer in the api for thread.stop() and why they deprecated the method.
  10. Re: Can't get lines to cut at 60 characters and continue on next line right

    You'll want to follow Norm's advice and look at substring to do it a more efficient way. But to fix your way, make sure you look at value j in the print statement.
  11. Replies
    1
    Views
    1,943

    Re: I don't understand what I'm supposed to do

    You're getting 2 inputs, either through parameters or keyboard input, and you need to evaluate the equation to see if it is balanced with those inputs.... I'd also drop the if else and just return...
  12. Re: Why do these things fail sometimes? Annoying program!

    Sounds like Connect 4.
    Something else seems to be at fault here, have you confirmed that the range of the loop variables, i and j, are correct? Hook us up with the code for the loops and the related...
  13. Thread: Student Programs

    by JJeng
    Replies
    4
    Views
    2,083

    Re: Student Programs

    Hmm, sounds like senior project. I'd recommend starting from scratch tho. It would be a personal measure of your designing skills. Bank related? Try something like an ATM system that has multiple...
  14. Thread: DFS in Graphs

    by JJeng
    Replies
    2
    Views
    2,788

    Re: DFS in Graphs

    I think I see a problem in getUnvisitedChildNode(), Is it possible for it to return a null value?
  15. Thread: Please....Help.

    by JJeng
    Replies
    2
    Views
    1,384

    Re: Please....Help.

    java RMI?
  16. Replies
    4
    Views
    1,420

    Re: Cannot get to compile

    Where is the setBrand method?
  17. Replies
    5
    Views
    1,352

    Re: How to add buttons on this code

    JOptionPane from Java 6 API I'd suggests the last example, and taking a look at the option parameters in the constructors.
  18. Replies
    7
    Views
    1,303

    Re: NullPointerException error

    I've looked over it, but can't find it. At this point I'd put some println's in the sort method for cameraList[i] and i+1, as well as the value of i, above the if statement. I'd do it myself, but...
  19. Replies
    4
    Views
    1,331

    Re: Problem reading correctly from a file

    "int[][] protimiseisA = null;" say the variable protimiseisA is an int[][] type. But assigning anything to null means no memory location has been assigned to the variable, Thus making java throw the...
  20. Replies
    4
    Views
    1,331

    Re: Problem reading correctly from a file

    So where did you initialize protimiseisA ?
  21. Replies
    2
    Views
    4,000

    Re: Help with method plz..

    Also, instead of rewriting the print from scratch and introducing code duplication, call the print from the parent first, then add the perryComoFan println.
  22. Replies
    3
    Views
    1,381

    Re: Issue with beginner program

    It all depends how you'd want to design your system. For a simple system, you could try and add the username and password to the file at the same time. That would require editing to okUsername,...
  23. Replies
    3
    Views
    1,381

    Re: Issue with beginner program

    The issue is in the 'else' block of the username check, I'd recommend doing something similar to what you are doing with the password check loop instead of using 'if else'. Let me know if you...
  24. Replies
    8
    Views
    1,961

    Re: Bowler calculate project, two errors

    Try adding a println with 'input' around line 28-29. It should give you the path it's looking for.
  25. [SOLVED] Re: this.something = something - problem with "double"

    I'm guessing that maxMasa in the element class is an int, can you verify the type in the element class?
Results 1 to 25 of 59
Page 1 of 3 1 2 3