Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Arguments in method

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
One of the question in Jworski exam is
is the statement below true
"getComponent() method is used to access a Component in a container."
Answer given is true.
But there is no getComponent method with no argument.
Instead there is a method (I remember) : getComponent(int i)
So while answering such types of questions should we ignore the argument list?
Thanks
Shikhar
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The style of giving a method name like this:
getComponent()
when in reality the method takes some arguments is pretty widespread. You will have to try to figure out from the context of the question whether it is about the existance of a no-args method.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic