File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Arguments in method

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Mar 22, 2000
Posts: 12769
    
    5
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Arguments in method