O'Reilly logo

The class of Java by Pravin Jain

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 10

Commonly Used Classes from the java.lang Package

As seen in Chapter 9, there are various packages available as part of the Java API. One of the basic packages is the java.lang package. This package contains the core classes and interfaces used in the Java Language. These include classes and interfaces like System, String, StringBuffer, StringBuilder, CharSequence, Comparable, Math and the Wrapper classes. In this chapter we discuss some of these classes and interfaces and their common usages.

10.1 Comparable AND Comparator INTERFACES

We saw in Chapter 3 that the relational operators < > <= >= work only for numeric data types, i.e. the comparison is not available for reference data types. For boolean data types, it is very logical that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required