About Question enthuware.ocpjp.v7.2.1362 :
Moderator: admin
-
- Posts: 2
- Joined: Tue Oct 06, 2015 9:05 am
- Contact:
About Question enthuware.ocpjp.v7.2.1362 :
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.
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1362 :
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.
The cases given in this code fall under the "Class Invariants" category.
HTH,
Paul.
-
- Posts: 2
- Joined: Tue Oct 06, 2015 9:05 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1362 :
thanks, now it's clear
Who is online
Users browsing this forum: No registered users and 8 guests