Yes, you have to call your function. Java won't automatically call your function for you.
However, Java *does* automatically call the main() method for you. That's the whole point of the main()...
Type: Posts; User: KevinWorkman
Yes, you have to call your function. Java won't automatically call your function for you.
However, Java *does* automatically call the main() method for you. That's the whole point of the main()...
Why would it? When do you call your duck() function?
Okay, and what exactly do you mean when you say this doesn't work? When do you call your duck() function?
What exactly do you mean when you say that this won't work?
Where is your class? Where is your main method?