Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread question from www.scjptest.com

 
Anbarasu Aladiyan
Ranch Hand
Posts: 182
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question was asked in scjptest.com website
Question:
Given the code. What is the result?
And Options are
A)Compilation fails
B)An exception is thrown at runtime
C)"BeginRunEnd" is printed
D)"BeginEndRun" is printed.
E)"BeginEnd" is printed
And I thought answer is "unpredictable".Because it may print "BeginRunEnd" or "Run BeginEnd". I have checked it by adding the below code at line AAm I correct?
If yes. Will we get these type of questions in real exam?
And which option/answer is correct?
 
Chinna Eranna
Ranch Hand
Posts: 174
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will go for..

C)"BeginRunEnd" is printed

Because.. that is the possible answer in the options.. provided.
 
Harpreet Singh janda
Ranch Hand
Posts: 317
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Answer is unpredictable but because in the give options the only possible answer is "BeginRunEnd" and unpredictble is not in the options, so this should be the answer.
 
Anbarasu Aladiyan
Ranch Hand
Posts: 182
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Chinna Eranna and Harpreet Singh janda,
Will we get these type of questions in real exam?
 
Harpreet Singh janda
Ranch Hand
Posts: 317
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not taken exam yet so can't say anything
 
Chinna Eranna
Ranch Hand
Posts: 174
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
me too
 
Anbarasu Aladiyan
Ranch Hand
Posts: 182
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lol
 
Ankit Garg
Sheriff
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The questions on the real exam won't be ambiguous. This question is perfectly valid though, as you are asked to choose one option and one of the answer is possible...
 
Anbarasu Aladiyan
Ranch Hand
Posts: 182
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ankit.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic