okay, thank you.
Type: Posts; User: wamidh
okay, thank you.
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...
oh, thank you but what do I write to call my function duck?
I am meant to call my function? how do I do this?
thank you for your reply.
it won't say eric when I click run
public class Wamidh {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
public void duck(){
String yellow = "eric";
System.out.println("" + yellow);
}
I don't understand why this won't work? thank you.
public void duck(){
String yellow = "eric";
System.out.println("" + yellow);
}