File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 13037
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!