About Question enthuware.ocpjp.v7.2.1362 :

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

Moderator: admin

Post Reply
Artem Voronov
Posts: 2
Joined: Tue Oct 06, 2015 9:05 am
Contact:

About Question enthuware.ocpjp.v7.2.1362 :

Post by Artem Voronov »

How all of these code snippets given in options 1, 2, and 3, can be appropriate? All methods are public and for such cases we should throw exceptions, not assert errors. The same explanation could be found in other similar questions.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1362 :

Post by admin »

This is as per Oracle's official recommendations given here: http://docs.oracle.com/javase/7/docs/te ... html#usage

The cases given in this code fall under the "Class Invariants" category.

HTH,
Paul.

Artem Voronov
Posts: 2
Joined: Tue Oct 06, 2015 9:05 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1362 :

Post by Artem Voronov »

thanks, now it's clear

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 10 guests