Search:

Type: Posts; User: dpek

Search: Search took 0.31 seconds.

  1. Thread: Tabbing columns

    by dpek
    Replies
    4
    Views
    617

    [SOLVED] Re: Tabbing columns

    I'm not quite sure how you can "jack up" the plus signs, but just "remember that " + " concatenates two strings, in general."

    So, did it work for you? P: (Don't forget to mark the thread as solved...
  2. Re: Can anyone please help me with this java code for minesweeper game!

    imho, it feels like you're just asking us to finish the code for you, rather then getting us to help you understand a problem you have.

    If you aren't, it would be great if you could explain what...
  3. Thread: Tabbing columns

    by dpek
    Replies
    4
    Views
    617

    [SOLVED] Re: Tabbing columns

    None of your "\t"s are in quotes. "\t" only works when it's part of a string. Your println statement should look like this:

    System.out.println( n+"\t" + n*n+"\t" + n*n*n );
  4. Re: I cannot get to print out all my information.

    First of all, what are you having trouble with? You seem to be using println statements correctly. Can you please be more specific about what you are trying to print out?
  5. Thread: Please Help Me

    by dpek
    Replies
    3
    Views
    511

    Re: Please Help Me

    Sorry if I'm wrong, but that looks like Python, not Java. You'll need to go elsewhere for help on that.
  6. Replies
    3
    Views
    722

    [SOLVED] Re: Using values set in one class in another

    No problem, glad you got it solved. I would suggest looking more into class-specific things in java like public, private, protected, static, void, get/set methods, what the args in public static void...
  7. Re: loading things from a text file into an array list

    Don't forget to mark this topic as solved by changing the topic title to "[SOLVED] loading things from a text file into an array list" ^____^
  8. Replies
    2
    Views
    1,334

    Re: Parking Lot Program help!

    First you said you needed to display the cars:



    Then you said you didn't need to:

    [/quote]

    My question is: Are you required to create a program that displays cars entering and exiting?...
  9. Re: loading things from a text file into an array list

    There is, but you don't need to, since the last comma is ignored when you load the file.


    I'm guessing you've never seen foreach loops before and you don't know what .split() does.

    .split...
  10. Replies
    3
    Views
    722

    [SOLVED] Re: Using values set in one class in another

    There are also a couple ways to do this, like setting a getInventory() method in your player class, which returns the inventory. And actually, you don't even need to do this at all. Since you...
  11. Re: loading things from a text file into an array list

    I'm sorry, but I'm not quite sure what you're trying to say here.

    If you want to convert "a,b,c" to an array [a,b,c], so that the list of elements are put in the array correctly, the try block of...
  12. Re: loading things from a text file into an array list

    However, in your save.java class, you are doing this:


    try {
    PrintWriter save = new PrintWriter(new FileWriter("save.txt"));
    save.print(player.inventory + " ");
    save.close();
    }

    Which...
  13. Re: loading things from a text file into an array list

    Try using savedInv.next() instead of savedInv.nextLine()
  14. Thread: Hello everyone!

    by dpek
    Replies
    1
    Views
    282

    Hello everyone!

    Hi, I've taken a couple of Computer Science classes and I'm coming over here to see if I can help other fellow Java programmers with their programming problems!

    You can check out my blog, if you...
Results 1 to 14 of 14