Modeling Entities in Java: Static Members, Arguments, & Method Overriding

Java SE 15
  • 14 Videos | 2h 6m 6s
  • Includes Assessment
  • Earns a Badge
The best way to avoid mysterious bugs while running your Java code is to be adept at working with static members, argument passing, and object base class methods​. Use this course to master these subtleties: the difference between static and instance variables and methods, the hashCode contract, and how pass-by-value and pass-by-reference semantics play out with argument passing in Java. By the end of this course, you'll be able to model state in classes using both static and instance variables, write methods to avoid unexpected changes in input arguments, and adhere to the hashCode contract so that objects function as expected when placed in common Java containers.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    recall Java best practices to access static variables
    use class references to access static variables and describe the use of the 'final' keyword
    outline access restrictions on instance members from static members
    implement a scenario using a static variable to count instantiated objects
    use class reference to invoke and execute static methods
    reassign variables inside methods and explore where the changes are visible
  • contrast the effects of variable reassignment with variable modification
    outline pass-by-value and pass-by-reference with custom objects
    recall the operation of the == operator and the default .equals() method
    examine how to work with the .equals() and .hashCode() methods and the hashCode contract
    override .equals() to check for semantic equality
    override .hashCode() and .equals() to honor the hashCode contract
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 35s
    UP NEXT
  • Playable
    2. 
    Accessing Static Variables
    10m 31s
  • Locked
    3. 
    Using Static Variables and the final Keyword
    8m 4s
  • Locked
    4. 
    Working with Static and Instance Methods and Fields
    9m 51s
  • Locked
    5. 
    Using a Static Field for Auto-counting Objects
    9m 47s
  • Locked
    6. 
    Using a Class Reference to Invoke Static Methods
    11m 43s
  • Locked
    7. 
    Exploring Field Reassignments
    9m 49s
  • Locked
    8. 
    Understanding Pass-by-Value and Pass-by-Reference
    10m 52s
  • Locked
    9. 
    Pass-by-value/Pass-by-reference with Custom Objects
    4m 54s
  • Locked
    10. 
    Checking Object Equality with == and .equals()
    10m 23s
  • Locked
    11. 
    Understanding the HashCode Contract
    8m 31s
  • Locked
    12. 
    Overriding the .equals() Method
    8m 45s
  • Locked
    13. 
    Overriding the .hashCode() Method
    11m 33s
  • Locked
    14. 
    Course Summary
    2m 50s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.