Search:

Type: Posts; User: tai8

Page 1 of 2 1 2

Search: Search took 0.50 seconds.

  1. Replies
    3
    Views
    485

    Re: Why won't it read file?

    How do I do that? I don't know how to place the text file in the same directory as the java file.
  2. Replies
    3
    Views
    485

    Why won't it read file?

    Hello so for this problem i have to read a text file but for some reason it won't let me do it.

    this is my code:



    import java.io.BufferedReader;
    import java.io.FileReader;
    import...
  3. Replies
    24
    Views
    1,392

    Re: Why isn't this code working?

    my god i really dont know... anyone?
  4. Replies
    24
    Views
    1,392

    Re: Why isn't this code working?

    I tried it and still nothing. sigh... i want to die :(
  5. Replies
    24
    Views
    1,392

    Re: Why isn't this code working?

    I don't think changing the order does anything. I just tried and nothing. I dont know why the 3 stands are not adding together. what is wrong with the code there?
  6. Replies
    24
    Views
    1,392

    Re: Why isn't this code working?

    The problem is i'm not sure why the numbers for hot dog stands 1, 2, and 3 are not adding up. I know what i want to do, i just don't know how to get there.
  7. Replies
    24
    Views
    1,392

    Re: Why isn't this code working?

    So how would i fix it then? Do i just delete all the loops then?
  8. Replies
    24
    Views
    1,392

    Re: Why isn't this code working?

    Why isn't this adding up?

    Ok so i finally got the program to output but the problem is the sum of the output is wrong. This is what i have:



    class HotDogStand
    {

    private int id;
  9. How can you get the compiler to run more than one public class?

    I'm having problems with this one question, i have been at it all day now and i still don't get it.



    public class HotDogStand
    {

    private int id;
    private int numSold;
    private static int...
  10. Replies
    24
    Views
    1,392

    Re: Why isn't this code working?

    I'm using NetBeans too. How did you get that? Did you copy and pasted exactly what I posted and ran it or did you change anything to the code at all?

    Oh I forgot to mention I also have this...
  11. Replies
    24
    Views
    1,392

    Re: Why isn't this code working?

    How do i do that?
  12. Replies
    24
    Views
    1,392

    Re: Why isn't this code working?

    Really? What IDE did you use and what does your output look like?
  13. Replies
    24
    Views
    1,392

    Re: Why isn't this code working?

    All it says is this:

    run:
    BUILD SUCCESSFUL (total time: 2 seconds)

    What is it supposed to show?
  14. Replies
    24
    Views
    1,392

    Why isn't this code working?

    Ok so I have a problem.

    You operate several hot dog stands distributed throughout town. Define a class named HotDogStand that has a member variable for the hot dog stand's ID number and a member...
  15. Replies
    5
    Views
    376

    Re: How to get rid of this?

    Can you please elaborate? What println statements and where should they go? Thank you.
  16. Replies
    5
    Views
    376

    Re: How to get rid of this?

    No one knows the answer?
  17. Replies
    5
    Views
    376

    How to get rid of this?

    Hello, so I am still stumped on this 99 bottles problem. I got most of it working however there are still some issues. This is what i have so far.


    public class BottleSong {
    private int...
  18. Replies
    33
    Views
    1,682

    Re: Why isn't this code working?

    What number of bottles?

    There is no error. It's just the wrong code.
  19. Replies
    33
    Views
    1,682

    Re: Why isn't this code working?

    Oh ok. Um I just need the output to say:

    Ninety Nine bottles of beer on the wall,
    Ninety Nine bottles of beer,
    Take one down, pass it around,
    Ninety eight bottles of beer on the wall.
    ...
  20. Replies
    33
    Views
    1,682

    Re: Why isn't this code working?

    Thank you. Better now?
  21. Replies
    33
    Views
    1,682

    Re: Why isn't this code working?

    That's the problem I don't know. I'm new to this forum and I'm not sure how to do it. So you just want me to quote my code I'm guessing?
  22. Replies
    33
    Views
    1,682

    Re: Why isn't this code working?

    Ok I tried something completely different. This is my completely different code.



    public class BottleSong {
    private int bottles =99;
    public BottleSong(int n)
    {
    bottles = n;
    }
  23. Replies
    33
    Views
    1,682

    Re: Why isn't this code working?

    I thought I already did do that. How do I create an instance of the class and call one of its methods?
  24. Replies
    33
    Views
    1,682

    Re: Why isn't this code working?

    So am I supposed to just add this: "System.out.println("\nTake one down, pass it around\n");" after the public static void main(String[] args) { ? I did and when I ran it it outputted Take one down,...
  25. Replies
    33
    Views
    1,682

    Re: Why isn't this code working?

    How do I do that? I'm sorry for asking these questions, I'm a beginner with this and really don't know...
Results 1 to 25 of 47
Page 1 of 2 1 2