Chapter 8. Numbers and Dates

This chapter compares the support for numbers, dates, and times provided in the Java class library with those in Microsoft .NET. Java and C# both provide language-level support for straightforward numeric operations; more complex features are implemented in the class libraries. Conversely, neither Java nor C# provides language-level support for working with dates and times; classes offer a better solution to the complexities of localization.


The .NET numeric types and the C# language syntax used to manipulate them are discussed in Chapter 5. As described in Chapter 5, .NET value types are implemented as structs and have object capabilities. This section discusses the object features of the numeric types, particularly ...

Get C# for Java Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.