Identifying Method Signatures
In this activity, you will explore the API for various classes and examine methods to understand what they do, what data they require, and what data will be returned, if any. You should always explore the API for the latest version of Java. Java is updated every 6 months (September and March). Just like with all software, if it important to be on the latest version of Java.
Get started: Find the latest API by searching API Java and the version number in your browser. Use the search bar to find the class you will be investigating.
|
Grab a Piece of Paper! |
LocalDate Class
Find the API documentation for the LocalDate class. For each method complete the following:
- Identify the method signature.
- What is the return type of this method?
- Provide a brief description of what this method will do.
- Is this method overloaded?
- Is so, how can you determine which one to use?
- Is the method a class method or instance method?
- Provide an example of this method being called.
- now
- parse
- of
- minusDays
- plusDays
- isAfter
- isBefore
- getYear
- withYear
Need help? Check out this tutorial on LocalDate class.