Search:

Type: Posts; User: tai8

Search: Search took 0.09 seconds.

  1. Replies
    33
    Views
    4,810

    Re: Why isn't this code working?

    What number of bottles?

    There is no error. It's just the wrong code.
  2. Replies
    33
    Views
    4,810

    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.
    ...
  3. Replies
    33
    Views
    4,810

    Re: Why isn't this code working?

    Thank you. Better now?
  4. Replies
    33
    Views
    4,810

    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?
  5. Replies
    33
    Views
    4,810

    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;
    }
  6. Replies
    33
    Views
    4,810

    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?
  7. Replies
    33
    Views
    4,810

    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,...
  8. Replies
    33
    Views
    4,810

    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...
  9. Replies
    33
    Views
    4,810

    Re: Why isn't this code working?

    So no one knows? I'm not sure why it isn't running...
  10. Replies
    33
    Views
    4,810

    Re: Why isn't this code working?

    So you're saying I should remove that statement? I did and when I ran it I got nothing. Is the code supposed to be working?
  11. Replies
    33
    Views
    4,810

    Re: Why isn't this code working?

    Ok is this readable now?

    Basically the only problem I have is the line that says, "new BottleSong(Integer.parseInt(args[0])).pr… ". It's saying illegal character: \8230 and that it's not a...
  12. Replies
    33
    Views
    4,810

    Re: Why isn't this code working?

    Can anyone please help me?
  13. Replies
    33
    Views
    4,810

    Re: Why isn't this code working?

    How do I do that? I don't see what the problem is. I copied and pasted everything from my IDE to here. I'm using NetBeans if that matters.
  14. Replies
    33
    Views
    4,810

    Re: Why isn't this code working?

    For the public static void main thing it says "illegal static declaration in inner class assignment.pkg4.pkg1.Assignment41.BottleSong. Modifier 'static' is only allowed in constant variable...
  15. Replies
    33
    Views
    4,810

    Re: Why isn't this code working?

    Ok this is what I have so far.

    The problem lies in the last 3 lines. Where I wrote "here" that's where the red question mark pops up indicating an error. Also, when I try to run it why does it...
  16. Replies
    33
    Views
    4,810

    Why isn't this code working?

    Hello, I am trying to write a program that would output the song "ninety nine bottles of beer on the wall" but for some reason this code isn't working. These are the directions.


    Write a...
Results 1 to 16 of 16