Search:

Type: Posts; User: wamidh

Search: Search took 0.31 seconds.

  1. Thread: Confused

    by wamidh
    Replies
    13
    Views
    928

    Re: Confused

    okay, thank you.
  2. Thread: Confused

    by wamidh
    Replies
    13
    Views
    928

    Re: Confused

    I tried that out but then it said cannot make static reference to non-static method duck() from the type Wamidh.
    Then I changed the duck function to static and then it worked!
    I don't know if it's...
  3. Thread: Confused

    by wamidh
    Replies
    13
    Views
    928

    Re: Confused

    oh, thank you but what do I write to call my function duck?
  4. Thread: Confused

    by wamidh
    Replies
    13
    Views
    928

    Re: Confused

    I am meant to call my function? how do I do this?

    thank you for your reply.
  5. Thread: Confused

    by wamidh
    Replies
    13
    Views
    928

    Re: Confused

    it won't say eric when I click run
  6. Thread: Confused

    by wamidh
    Replies
    13
    Views
    928

    Re: Confused

    public class Wamidh {

    public static void main(String[] args) {
    // TODO Auto-generated method stub
    }
    public void duck(){
    String yellow = "eric";
    System.out.println("" + yellow);
    }
  7. Thread: Confused

    by wamidh
    Replies
    13
    Views
    928

    Confused

    I don't understand why this won't work? thank you.




    public void duck(){
    String yellow = "eric";
    System.out.println("" + yellow);
    }
Results 1 to 7 of 7