Search:

Type: Posts; User: stanfordjava

Search: Search took 0.22 seconds.

  1. [SOLVED] Re: changing for loop to while statement..

    sorry about the confusion...for some reason the code is working fine???? I copied it and pasted it to a new project and it works, feel free to delete this tread and thanks for the reply though!
  2. [SOLVED] changing for loop to while statement..

    Hello again,
    I am having trouble doing a simple exercise changing a for loop to a while statement, it works fine in the for loop but in the while statement it just prints out 10(it is supposed to...
  3. Re: code is giving me a different result then expected..

    Thank you very much...some times its so simple but I cant see
  4. code is giving me a different result then expected..

    Hello again, I am having problems with writing a simple program to see if a number is divisible by 6.


    public void run() {
    println("This program will display all numbers divisable by");...
  5. Replies
    10
    Views
    253

    Re: Working code But not intended result?

    I see it does basically the same thing, I just don't understand why it wouldn't work for me with a for loop .So if I wrote it correctly it should still work with the for loop?
    Gonna have to try to...
  6. Replies
    10
    Views
    253

    Re: Working code But not intended result?

    This is what I ended up using..


    public void run() {
    println("This program will sing the dreaded song 99 bottles of beer on the wall");
    println("Feel free to change 99 to what ever you...
  7. Replies
    10
    Views
    253

    Re: Working code But not intended result?

    well I was looking for honest feed back not wise ass remarks, I am new to this like I said so no I didn't answer my own question, if I did I wouldn't know it(hence being new! HMMMM)

    The post also...
  8. Replies
    10
    Views
    253

    Re: Working code But not intended result?

    The variable nBottles is the one printed out but it doesn't change, it just prints that same number over until done instead of subtracting a number each time which is what I would like it to do. I...
  9. Replies
    10
    Views
    253

    Working code But not intended result?

    Hello, again, I have another question if your able to help me. I am doing the Stanford 106a class on you tube so I am using acm imports which are outdated apparently but any help none the less...
  10. Replies
    11
    Views
    275

    Re: easy prob, just not for me

    Yes thank you I have solved the problem now, I am a little discouraged now thinking I am wasting my time with what I am learning. It is a Stanford University lecture but it is from 2008. I just...
  11. Replies
    11
    Views
    275

    Re: easy prob, just not for me

    Thanks for this, I wasn't sure how to put Boolean in, just the word true worked like


    Square.setFilled(true);
  12. Replies
    11
    Views
    275

    Re: easy prob, just not for me

    public void run() {
    GRect Square = new GRect(100,100,50,50);
    Square.setFilled(Square.isFilled());
    Square.setFillColor(Color.BLACK);
    add(Square);


    I am still not sure if I am doing...
  13. Replies
    11
    Views
    275

    Re: easy prob, just not for me

    ok, sorry if posted wrong, was I just supposed to put the code part like this

    import acm.graphics.*;
    import acm.program.*;
    import java.awt.*;

    public class Target extends GraphicsProgram {...
  14. Anyone following along with stanford106a?

    Hello,

    I am very new to programming and I am learning by doing Stanford's you tube 106a class.
    I am curious if anyone else is doing or has done this before, I am looking to set up some kind...
  15. Replies
    11
    Views
    275

    easy prob, just not for me

    Hey you ever have that brain fart moment where no matter how long you look at something it won't come? Well that is me now, I am a pretty inexperienced noob to java so please spare the possible...
Results 1 to 15 of 15