Skip to main content

Assertions in Java

  • Chapter
Key Java

Part of the book series: Practitioner Series ((PRACT.SER.))

  • 585 Accesses

Abstract

Any software system, whether object-oriented or not, relies on the state of the system being “correct” at certain stages of its execution. To take a very simple example, when a numerical division operation is performed the divisor must be non-zero. If this is not the case, the system may crash in an unpredictable and uncontrolled manner.

1

This chapter is based on a paper originally written in collaboration with Dr F.W. Long, of the Department of Computer Science, University of Wales, Aberystwyth.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Further Reading

  • Fiater D.W., Yesha Y. and Park E.K. (1993) Extensions to the C programming language for enhanced fault detection. Software — Practice and Experience; 23(6): 617–628.

    Article  Google Scholar 

  • Gaution P. (1992) An assertion mechanism based on exceptions. In Proc. 4th C++ Tech. Conf., pp. 245–262. USENIX Association.

    Google Scholar 

  • Joch A. (1995) How software doesn’t work. Byte; 49–60, December.

    Google Scholar 

  • Luckham D.C., von Henke F.W., Krieg-Brückner B. and Owe O. (1987) Anna — A language for Annotating Ada Programs. Lecture Notes in Computer Science, vol. 260. Springer-Verlag, Berlin.

    Book  MATH  Google Scholar 

  • Rosenblum D.S. (1995) A practical approach to programming with assertions. IEEE Transactions on Software Engineering; 21(1): 19–31.

    Article  Google Scholar 

  • Cook S. and Daniels J. (1994) Designing Object-Oriented Systems: Object-Oriented modelling with Syntropy. Prentice Hall, New York.

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag London Limited

About this chapter

Cite this chapter

Hunt, J.E., McManus, A.G. (1998). Assertions in Java. In: Key Java. Practitioner Series. Springer, London. https://doi.org/10.1007/978-1-4471-0607-4_13

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-0607-4_13

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-76259-1

  • Online ISBN: 978-1-4471-0607-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics