Effective Core Java

25900 kr

Take the next step in your career and become a serious Java developer! You will learn how to follow best practices in Java programming in order to produce high quality code in terms of performance, maintainability and readability.

This is a 3-day course for Java programmers who want to enhance their competence in Java programing aiming for producing robust code of great quality.

Kategorier: ,

Beskrivning

The course adheres to the guide lines defined by Joshua Bloch in ”Effective Java”, and systematically covers a number of areas within software development using core Java APIs. You will get a thorough understanding of the power of unit testing, avoiding common errors and pitfalls. Core Java APIs will be covered in detail.

The course expands on the many new features introduced in recent Java releases including modules, record type, sealed classes, Optional, the Date & Time API, functional programming using lambda expressions, enhanced interface definitions and the Stream API. Code examples/exercises will be presented in UML and correct robust Java code, complemented by a great number of predefined unit tests.

Target Group

  • Java programmers who want to enhance his/her competence in Java programing aiming for producing robust code of great quality.
  • Developers having skills from a previous Java version, who need an update and want to get a deeper knowledge of the Java programing language and its core APIs.
  • Experienced C++ / C# programmers who want an introduction to Java at full speed!


Hands-On

Every chapter is backed by complete examples that are ready to run. In addition there are a number of exercises that will be addressed and discussed during the course. All Java code, examples and solutions, will be part of the documentation available for participants.

Documentation

  • Copies of course slides
  • Complete code for all examples/exercises
  • Recommended reference literature: “Effective Java 3rd ed” Joshua Bloch

Contents:

1. Unit Testing

– Overview of JUnit testing framework

o Test Framework Architecture
– Design Pattern Composite

o Basic Test Case
o Test suite
o Negative Tests
o Data Driven Tests
– Code Coverage

2. Overriding Object Methods

– equals
o Using pattern matching instanceof operator

– hashCode
o Using prepared static Objects methods

– toString
o Using Formatter for textual output

– clone
– finalize
– Implementation of interface Comparable<T>

3. Exception handling
– Errors vs. Exceptions
– Overview exceptions
o Runtime exceptions
o Checked exceptions
o Chained exceptions
– Exception usage best practice
o Validating method arguments
o Defensive copying of return values
o Avoid returning null

4. Software Design – Classes

– Level of access
o Public methods and private attributes
o Immutable classes – value classes
o Java type record
– Class design
o Inheritance vs. composition
o Restricted inheritance using sealed classes
– Nested classes
o Static classes
o Inner classes
o Anonymous classes
o Local classes
– Creating and destroying objects
o Static factory methods vs. constructors
o Utility Classes

5. Software Design – Interfaces

– Class design
o Interfaces defines contracts
o Abstract Classes
o Interface vs. Abstract class
– Java Interface additions
o Interfaces supporting static methods
o Interfaces supporting default methods
o default methods vs. Inheritance

6. Generics and Typesafe Collections

– Generics
o Parameterized types
o Arrays vs. Generics
– Type safety in collection classes
o Erasure guarantees backwards compatibility4. Software Design – Classes
– Level of access
o Public methods and private attributes
o Immutable classes – value classes
o Java type record
– Class design
o Inheritance vs. composition
o Restricted inheritance using sealed classes
– Nested classes
o Static classes
o Inner classes
o Anonymous classes
o Local classes
– Creating and destroying objects
o Static factory methods vs. constructors
o Utility Classes

5. Software Design – Interfaces

– Class design
o Interfaces defines contracts
o Abstract Classes
o Interface vs. Abstract class
– Java Interface additions
o Interfaces supporting static methods
o Interfaces supporting default methods
o default methods vs. Inheritance

6. Generics and Typesafe Collections
– Generics
o Parameterized types
o Arrays vs. Generics
– Type safety in collection classes
o Erasure guarantees backwards compatibility

7. The Collections Framework in Detail
– Basic interfaces
o Iterable, Collection
o List, Set, Queue
– Basic implementation classes
o ArrayList, HashSet, LinkedList
– Iterator vs. for:each-loop
– Interfaces defining comparison criteria
o Comparable, Comparator
– Specialized interfaces
o Deque, SortedSet, NavigableSet
– Implementation classes for specialized interfaces
o ArrayDeque, PriorityQueue, TreeSet
– Interfaces defining associative data structures
o Map, SortedMap, NavigableMap
– Implementation classes for Maps
o HashMap, TreeMap
– Performance aspects for implementation classes
– Utility classes Arrays and Collections
– Special Collection classes
o LinkedHashSet, LinkdedHashMap, WeakHashMap

8. Enums

– Enum defining named constants
– Enum as a Java type defining attributes and methods
o Special rules apply for Enum constructor
– Enum comparison pattern
o Customization needed for control
– Collection classes using Enum based keys
o EnumSet, EnumMap

9. Optional

– Optional – the null-killer!
– Optional<T> as a wrapper for any Java type
– Optional providing alternatives when value is missing
– Avoiding NullPointerExceptions in parameter passing
o API code becomes safer

10. Modules in Java

– Additional scoping level in Java
• Adds layer on top of package
– Provides strict scoping rules
• Defined by special syntax
• Stored in file module-info.java
– Enables deliverables in module format
• Avoids clashes with client jar-files

11. Java I/O and Serialization

– Utility classes Files and Paths
– Configuration of applications based on Java I/O
– Serialization mechanism in Java
• Customization of serialization
• Externalizable for special purposes
• ObjectFilters protecting deserialization

12. Lambda Expressions

– Functional programming using lambda expressions
o Syntax for Lambda Expressions
o Deferred execution
o Capture of variables
– Functional Interfaces
o Built in support in Java APIs
– Predefined Interfaces supporting Lambda Expressions
o Function
o Operator
o Supplier
o Consumer
o Predicate
 Exception handling in lambda expressions
 Method references

13. Date & Time API
– Scientific Time
• Instant
• Duration
– Calendar Time
• LocalTime, LocalDate, LocalDateTime
• Period
– Zone-based Calendar Time
• ZoneID, ZonedDateTime
– Formatting Date & Time

14. The Streams API

– Stream creation from existing sources
o Arrays, Collections, Files
– Iterations using stream operations
– Streams using lambda expressions
– Filtering, transforming and reducing streams
o Optional<T> handling existing/missing return value
o Collectors for statistics
o Collectors for storing of output
– Bulk operations for collections
o Piping operations for enhanced performance
– Enabling parallel processing of streams

 

Kursen levereras i samarbete med Affix Byte Coders

Kontakta oss om denna kurs

Ytterligare information

Kurslängd

3 dagar

Lärarledd

Ja

Språk

Svenskt tal, material på engelska

Recensioner

Det finns inga recensioner än.

Endast inloggade kunder som har köpt denna produkt får lämna en recension.

Du kanske också gillar …