aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Fill-in the black questions help!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Fill-in the black questions help!!" Watch "Fill-in the black questions help!!" New topic
Author

Fill-in the black questions help!!

natarajan meghanathan
Ranch Hand

Joined: Feb 01, 2001
Posts: 130
Hi,
Can you please clarify whether we should semicolon at the end of the statement or not!!.
I was taking a JQ+ exam and one question was creating a layout manager. I am sure i wrote fine. It is
LayoutManager layout = new GridLayout(1,2);
But it gave me an error. The explanation they give was like how to create a layout what it does and all. But i think i got it wrong because of the semi-colon.
TIA.

Sun Certified Programmer for Java 2 Platform
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
On the REAL exam you will need the semi-colon.


"JavaRanch, where the deer and the Certified play" - David O'Meara
a vinay
Greenhorn

Joined: Feb 11, 2001
Posts: 1
I think you got the error because LayoutManager is an interface.We can only assign reference to it.We cannot use new operator with the interface i.e. they cannot be instantiated.
vinay
Peter Tran
Bartender

Joined: Jan 02, 2001
Posts: 783
A Vinay,
natarajan is correct. He's not new-ing an interface. He is using an interface reference to a GridLayout object which is allowed.
Cindy is correct. You will need to add a semicolon on the real test.
I asked SUN this question, and they said you should type it as though you were programming. From your statement, it looks correct. If you left off the semicolon, the statement would not have compiled.
-Peter
Ps. A Vinay, please see our naming policy at JavaRanch and re-register. Unless you really have people calling you "A", it would be appreciated if you would register with a complete first name. This way, if we ever run into each other, I don't have to feel bad shouting, "A...A!" (It makes me feel like I'm going through rehab.)
Michael Burke
Ranch Hand

Joined: Jul 29, 2000
Posts: 103
I gave the same answer to that question from JQ+ but one of the possible correct answers was the answer we gave so I quess it's just a mistake on JQ+ end.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Fill-in the black questions help!!