This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Arguments in method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Arguments in method" Watch "Arguments in method" New topic

Arguments in method

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13027
The style of giving a method name like this:
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.
I agree. Here's the link:
subject: Arguments in method
It's not a secret anymore!