Search:

Type: Posts; User: sp11k3t3ht3rd

Page 1 of 2 1 2

Search: Search took 0.11 seconds.

  1. Replies
    2
    Views
    1,276

    [SOLVED] Re: Creating new objects per key event

    Oh thanks! I never though of that. It works perfectly now!
  2. Replies
    2
    Views
    1,276

    [SOLVED] Creating new objects per key event

    Hey, I'm trying to make a basic Map Editor and was wondering how to create multiple image objects based on a key event. In the program right now, the player moves around. When they hit enter, an...
  3. Replies
    3
    Views
    1,451

    Re: Scanner help

    Thanks! I added a while loop for while the file has another line. Then in that is an if statement where if the string is the next string in the file, it does what it's supposed to. Otherwise it goes...
  4. Replies
    3
    Views
    1,451

    Scanner help

    I need a scanner to go through a file an see if it contains a certain string. Is there a method that I can use or am I out of luck? I essentially need a contains method but for the scanner and after...
  5. Re: loading things from a text file into an array list

    I added a line that prints out the array elements. And here's what it prints out:



    Does anyone have any ideas because I got really confused by putting this debug statement in.
  6. Replies
    1
    Views
    1,430

    [SOLVED] Re: Linked Lists

    It's because you have the line:


    private static double NaN;

    Then the value for that is never set and you start to return that value even though you never set it to anything. Also please use...
  7. Replies
    5
    Views
    1,763

    [SOLVED] Re: Code is correct, but incorrect output?

    I don't understand what your trying to accomplish with this code. What do you want the code to do?
  8. Re: loading things from a text file into an array list

    Hey, I just was playing around with the program and it only loads 1 thing from the text file. If you have more than 1 thing in it, it doesn't get loaded. Any ideas? I changed the code to this:

    ...
  9. Replies
    2
    Views
    2,060

    Re: Opposites of Sine Cosine and Tangent

    Oh, I was confused about what it meant by arc. Thanks!
  10. Replies
    2
    Views
    2,060

    Opposites of Sine Cosine and Tangent

    Alright I'm making a text based calculator. As of right now it does addition, subtraction, multiplication, division, square roots, squares, sine, cosine, and tangent. I am wondering if there is the...
  11. [SOLVED] Re: Using values set in one class in another

    Thanks a ton! I would have never figured that out!
  12. Re: loading things from a text file into an array list

    Thanks so much!
  13. Re: loading things from a text file into an array list

    I meant that when I saved the array list to the file its format was [a,b,c]. I said that I knew you could take the brackets off after the file was saved (making the saved file look like "a,b,c") but...
  14. Re: loading things from a text file into an array list

    This is the userInput class:


    import java.io.*;

    public class userInput {

    String input = null;

    public String getUserInput(String prompt) {
  15. Re: loading things from a text file into an array list

    I saved a,b,c in the text file which came to [a,b,c]. When I loaded it did this:
  16. loading things from a text file into an array list

    I'm trying to work out a way to save stuff in a text based game i'm making. The players inventory is an Array List. I worked out how to save the contents of it to a txt file but I have absolutely no...
  17. [SOLVED] Using values set in one class in another

    Okay I have 3 classes. One of them called player has an array list with two methods that can add and delete things from the array list. Another is called shop. The player array list has values set...
  18. [SOLVED] Re: Replacing letters in a string NOT WORKING.

    Never mind, I'm just going to keep it as it is. That way if anyone got a hold of the code they'd get tripped up a bit. :D
  19. [SOLVED] Re: Replacing letters in a string NOT WORKING.

    So use a loop with a position variable that increments each time it goes through all the characters? Suggestion on loop type?
  20. [SOLVED] Re: Replacing letters in a string NOT WORKING.

    Wow... :o I can't believe I didn't see that. Any suggestions on different values I could use or should I just make the capital letters the same as the lowercase letters?
  21. [SOLVED] Re: Replacing letters in a string NOT WORKING.

    This is all of my code. The weird thing is that I also am making the same program in C++. It uses the same changes (in both programs a gets changes to P1) but they both do it wrong, but in the same...
  22. [SOLVED] Replacing letters in a string NOT WORKING.

    I'm changing my encryption program so that instead of numbers it uses a combination like D5 or A9. This will make it easier for the decryption part of the program. It's not working properly though....
  23. Replies
    3
    Views
    2,021

    Re: "?" replacement

    Alright thanks! I might just take out the characters that are used in the Java Regex engine. This is only for my sophomore level science fair so it won't matter and I dont want peoples heads...
  24. Replies
    3
    Views
    2,021

    "?" replacement

    I'm making the encryption program mentioned in my other post. When I type all other character besides " ' /\ and . it works fine besides the question mark. It gives me this error when ever i type in...
  25. Replies
    2
    Views
    1,255

    [SOLVED] Re: replacing elements in a string

    Wow... :o...Thanks!
Results 1 to 25 of 38
Page 1 of 2 1 2