• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

How do you answer such questions?  RSS feed

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I saw this question on one of mock exam's and was wondering how one should approach such questions. Also does the real exam have such one's.

Below is the question, it does not mention anything ex: where the method is invoked with any parameter's / with the one's which will raise an exception...



Example: divide( 5, 4 ) - Finally
divide( 5, 0 ) - Exception Finally.

How do you decide?

Thanks.

(code brackets fixed)
[ August 03, 2004: Message edited by: Barry Gaunt ]
 
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kitty,

Your answer is correct. "Finally" is always printed. "Exception" is printed when an ArithmeticException is thrown. What answer was provided by the mock exam?
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maybe the question was "Check all that applies" ??
Since finally block always runs in this example, the answer is 1 and 3 ?
 
Kitty Dayal
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dan & Ryan,

Thanks for your replies. My doubt was actually different.

First,
Will there be question like the ones I asked in the real exam. As you can see, in this mock question, they didn't specify any question(Just code and options) and so it will be very hard to decide what they are actually looking. Have any of you come across such type of questions without actual question in your exams.

Secondly the answer that he gives in Exception Finally. No Explanation why so. (Also they had a radio button for that question, by which you could only select one option of the four).

Thanks,
Kits
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kitty,

The questions on the real exam are not like what you have described. The questions on the real exam contain actual questions. You won't find yourself wondering what the question actually is.

You mentioned that the question only provided radio buttons for a question that clearly has two correct answer options. The real exam is not perfect, but you probably won't see that kind of error on the real exam.

The questions on the real exam do specify the number of answer options that must be selected. The questions on my web site don't provide that information, but the questions in my book do.

You said that the mock exam provided no explanation for the answer. I hope that you didn't pay for that mock exam.

What mock exam is it?
 
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
About the mock i have taken it as well and it never said what u were suppose to do! I even chose the No output option cause it never allowed multiple answers! It's one of the listed exams on the mock page! I think it's 4test.com or something like that!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!