About Question enthuware.ocajp.i.v7.-2-.1372 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
admin
Site Admin
Posts: 10043
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.-2-.1372 :

Post by admin »

It does overflow and because of overflow the result swings between negative and positive. In one of the steps, the value of the factorial becomes zero. Once factorial becomes zero, next factorial will also be zero.
You may run the program with print statements and see the value of n and factorial at each step.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests