You can use assertions to detect errors that may otherwise go unnoticed. يمكنك استخدام التأكيدات لكشف الاخطاء التي يمكن ان تمر دون ان يلحظها احد خلاف ذلك. Assertions contain Boolean expressions that define the correct state of your program at specific points in the program source code. التأكيدات التي تحتوي على عبارات البوليه الصحيحه التي تحدد الدولة برنامجك في نقاط محددة في البرنامج شفره المصدر. The designers of the Java platform, however, didn’t include support for assertions. المصممون للمنصة جافا ، ومع ذلك ، لا يشمل ذلك تقديم الدعم لالتأكيدات. Perhaps they viewed exceptions as a superior feature, allowing you to use try/catch/finally to throw an exception instead of aborting the program as in assertions. ولعله ينظر الى الاستثناءات اعلى الميزه ، مما يتيح لك استخدام نحاول / الصيد / وأخيرا الى رمي استثناء بدلا من اجهاض البرنامج كما هو الحال في التأكيدات. But the Java 2 Platform, Standard Edition (J2SE) release 1.4, has introduced a built-in assertion facility. ولكن منهاج جافا 2 ، الطبعه الموحدة (j2se) الاصدار 1،4 ، وقد ادخلت مدمج مرفق تأكيد. This article does the following: هل هذه المادة ما يلي :

* Presents an overview of design by contract * يقدم لمحة عامة عن تصميم من قبل العقد
* Presents an overview of assertions * يقدم لمحة عامة عن التأكيدات
* Shows how to roll your own assertion capabilities * يدل على مدى لتجديد التأكيد على القدرات الخاصة بك
* Describes the new assertion facility * ويصف جديدة تأكيد مرفق
* Shows how to use the new assertion facility * وتبين كيفية استخدام جديدة وتأكيد مرفق
* Offers guidelines for using assertions * توفر مبادئ توجيهية لاستخدام التأكيدات
* Presents examples of how to use assertions * ويقدم امثلة على كيفية استخدام التأكيدات

Read the قراءة article here المادة هنا ; highly recommended. ؛ يوصي بشدة.