Search:

Type: Posts; User: dean_martin

Search: Search took 0.32 seconds.

  1. [SOLVED] Re: Could someone please help me figure out my homework please

    if (totalSize <=){
    System.out.println();

    }

    Here is what's missing
    (totalSize <= 100)

    It should look something like this:
  2. [SOLVED] Re: Could someone please help me figure out my homework please

    There is probably a Math method that does this for you, but this is faster for me than looking it up.

    int perimeter = (width + height * 2);
    int size = perimeter + length;

    There are some...
  3. [SOLVED] Re: Could someone please help me figure out my homework please

    1.You can reuse the scanner after declaring it once, because you are using it for int variables only.

    If (hypothetically)you needed to get a char or string, you need a char or string scanner. You...
  4. Re: Help me to complete this class, please

    Hi, I have a couple of suggestions. First, I recommend changing the name of the method putItem() to addFruit(), or something similarly descriptive. Also, change 'pItem' to 'fruit'.


    This method...
  5. Replies
    10
    Views
    3,168

    [SOLVED] Re: crazy NullPointerException

    I found this on a Sun webpage.


    I assume that trying to assign within the loop breaks the second rule. I am confused as to the reasoning
    behind the rule, but my issue is solved.
  6. Replies
    10
    Views
    3,168

    [SOLVED] Re: crazy NullPointerException

    I changed the for loop from enhanced to regular and the exception is not being thrown anymore.
    However, it feels like a patchjob and I'm not satisfied with it.

    Here is the snippet from the top...
  7. [SOLVED] Re: Could someone please help me figure out my homework please

    Pardon my duplication. I didn't refresh for awhile so I didn't see you already answered.
  8. Replies
    10
    Views
    3,168

    [SOLVED] Re: crazy NullPointerException

    Thanks for looking into this. The program randomly shuffles the deck, so the output for:


    System.out.print(players[0].pocketCard1.toString() + " ");

    should be a random card name, such as:
    ...
  9. Replies
    10
    Views
    3,168

    [SOLVED] Re: crazy NullPointerException

    Ok here is everything:

    edit: I'm using NetBeans 6.5.1



    public enum Suit {
    DIAMONDS,
    CLUBS,
    HEARTS,
  10. [SOLVED] Re: Could someone please help me figure out my homework please

    Here is part 1:



    public class OddorEven {

    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
  11. Replies
    10
    Views
    3,168

    [SOLVED] Re: crazy NullPointerException

    btw I forgot to introduce myself.

    I am a new programmer in the San Diego area. I just graduated from a computer information systems

    diploma level course and I'm close to an AA degreee. I...
  12. Replies
    10
    Views
    3,168

    [SOLVED] NullPointerException in Poker's program

    Hi, working on a poker program(isn't everybody?) After searching for hours on the web I'm hoping someone here can help me. Here is the problematic snippet below.



    // this part works fine
    for...
Results 1 to 12 of 12