Skip to Main Content
Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions
book

Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions

by Kishori Sharan
June 2014
Beginner content levelBeginner
810 pages
23h 28m
English
Apress
Content preview from Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions

CHAPTER 10

image

Assertions

In this chapter, you will learn:

  • What an assertion is in Java
  • How to use assertions in Java programs
  • How to enable and disable assertions
  • How to check the status of an assertion

What Is an Assertion?

The literal meaning of assertion is to state something in a strong, confident, and forceful way. When you assert “something,” you believe that “something” to be true. Note that asserting “something” does not make that “something” always true. It simply means that chances are very high (or you are confident) that “something” is true. Sometimes you may be wrong and that “something” may be false, even if you assert it to be true. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions

Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions

Kishori Sharan

Publisher Resources

ISBN: 9781430266532Purchase book