The document provides guidance on designing method signatures for APIs. It recommends:
- Choosing method names carefully based on conventions and consistency;
- Not over-providing convenience methods to avoid complexity;
- Aiming for fewer than four parameters to aid memorability;
- Using interfaces over classes for parameter types for flexibility;
- Using enum types instead of boolean parameters when possible;
- Using method overloading judiciously to avoid confusion between overriding and overloading.
This document discusses generics in Java. It begins by defining generics as a facility that allows types and methods to work with different types while maintaining compile-time type safety. It then shows an example of code using raw types that could result in exceptions at runtime due to improper type checking. The document explains how generics were introduced to address this issue by making type information like List<String> explicit. It also covers how generics are implemented internally and some of the key terminology like parameterized types, type erasure, wildcard types, raw types, bounded types, and generic methods. The document recommends always using parameterized types rather than raw types for type safety except in some specific cases.