Chapter 5 Dates, Strings, and Localization
THE OCP EXAM TOPICS COVERED IN THIS CHAPTER INCLUDE THE FOLLOWING:
- Use Java SE 8 Date/Time API
- Create and manage date-based and time-based events including a combination of date and time into a single object using LocalDate, LocalTime, LocalDateTime, Instant, Period and Duration
- Work with dates and times across time zones and manage changes resulting from daylight savings including Format date and time values
- Define and create and manage date-based and time-based events using Instant, Period, Duration and TemporalUnit
- Localization
- Read and set the local by using the Locale object
- Create and read a Properties file
- Build a resource bundle for each locale and load a resource bundle in an application
You learned about the basics of Java 8 dates for the OCA. In addition to reviewing these, we will cover more advanced date concepts including time zones, daylight savings time, and comparing values and instants. Be sure to read the whole section, because Oracle goes deeper into some topics that you’ve already learned.
You might notice that Strings
are not listed in the exam objectives. Since they are such a fundamental concept that might pop up in other questions, we will do a brief review here as well.
After that, we will discuss how to make your application work in different languages with localization. We will end with how to read ...
Get OCP Oracle® Certified Professional Java® SE 8 Programmer II now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.