Duration: 3 days
Course code: SS-JAV-022
In this course, you will learn Java best practices based on the famous book Effective Java. Through exercises and discussions you will master the finer points of Java and make steps towards becoming a master Java developer. The material is divided into sections covering important aspects of Java development. We focus on maximum impact for each of the selected areas.
Audience
- Java Application Developers
- Architects<l/i>
Prerequisites
Familiarity with Java is required.
Objectives
Upon completion, students will be able to:
- With confidence apply the concepts from Effective Java book
- Use best practices of Java development
- Avoid common, but dangerous Java antipatterns
- Improve the quality of their code, resulting in faster development and fewer defects
- Leave with skills needed to develop industrial Java applications
Outline for Effective Java Training Course
Creating and Destroying Objects
- Constructing and initializing objects
- Factory methods
- Builders
- Singletons
- Unnecessary objects
Common Object Methods
- Equals and hashCode methods
- Implementing toString
- Cloning objects
Mastering Classes and Interfaces
- Accessibility of members and classes
- Accessors vs. fields
- Composition vs. Inheritance
- Interfaces
- Class hierarchies
- Implementing strategies with function objects
Mastering Methods
- Designing method signatures
- Validate parameters
- Method overloading
- Using variable lists of arguments
Programming Techniques
- Foreach loops
- Minimizing scope of local variables
- Working with exact numbers
- Strings vs. more meaningful classes
- Interfaces vs. Reflection
- How to optimize
- Implementing Serializable
Generics
- Avoiding Raw types
- Favoring generic collections
- Creating generic types and methods
- Increasing API flexibility
Enumerations and Annotations
- Defining enumerations
- Using annotations
Working with Exceptions
- Handling exceptional conditions
- Using standard exceptions
- Unnecessary checked exceptions
- Exceptions and abstractions
- Capture failure information