Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JQ

 
Ragu Sivaraman
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question ID :953836219840
Write a line of code that declares a variable named 'layout' of subclass of class LayoutManager and initializes it with a new object, which when used with a container can lay out components in a rectangular grid having 2 columns and 4 rows.
(Use space only where necessary)
My answer is GridLayout layout = new GridLayout(4,2);
correct answer is:
GridLayout layout = new GridLayout(4, 2);
My answer compiles and works.. just that it doesnt have space after ,
How can this answer key be justified?
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, it happened to me too. I just didn't care about that and notified the authors of JQ+. Moreover, LayoutManager is not a class but an interface.
The problem is in the way they compare your answer with theirs
HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
[This message has been edited by Valentin Crettaz (edited December 09, 2001).]
 
Ragu Sivaraman
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Valentin Crettaz:
Yeah, it happened to me too. I just didn't care about that and notified the authors of JQ+. Moreover, LayoutManager is not a class but an interface.
The problem is in the way they compare your answer with theirs
HIH


Thankx Val..

 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3752
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ragu,
The question has the answer specified in 5 most probable ways. And it also says, "Use space only where necessary." If you enter one of them, it'll be marked correct. Ultimately it's just a string comparison
If you are asked to write 7 in octal and if you write 00007, it is very much possible that it is marked wrong, although it is correct. So, it is very important that you read and follow the instructions carefully in the exam .
HTH,
Paul.
 
Uma Viswanathan
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Val,
Is this (what Paul says) true with real exam or only with JQ+ s/w?
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Uma,
I don't really know how the real exam is implemented, but to be sure I'd do what Paul mentioned "So, it is very important that you read and follow the instructions carefully in the exam."
HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic