You are previewing Sams Teach Yourself Java in 21 Days, Sixth Edition.

Sams Teach Yourself Java in 21 Days, Sixth Edition

Cover of Sams Teach Yourself Java in 21 Days, Sixth Edition by Rogers Cadenhead Published by Sams
O'Reilly logo

Day 8. Data Structures

During the first week, you learned about the core elements of the Java language: objects, classes, and interfaces, along with the keywords, statements, expressions, and operators they contain.

For the second week, the focus shifts from the classes you create to the ones that have been created for you. The Java Class Library is a set of standard packages from Oracle that has more than 3,900 classes you can use in your own Java programs.

Today, you start with classes that represent data.

The following data structures are covered:

• Bit sets, which hold Boolean values

• Array lists, arrays that can grow and shrink in size

• Stacks, structures stored in last-in, first-out (LIFO) order

• Hash maps, which store items using keys ...

The best content for your career. Discover unlimited learning on demand for around $1/day.