Java 8 Fundamentals: Modern Java Development with Lambdas, Streams, and Introducing Java 9’s JShell and the Java Platform Module System (JPMS)

Video description

54+ hours of video instruction.

Overview

The professional programmer’s Deitel® video guide to Java™ SE 7 and SE 8 development with the powerful Java™ platform

Description

Written for programmers with a background in high-level language programming, this LiveLesson applies the Deitel signature live-code approach to teaching programming and explores the Java™ language and Java™ APIs in depth. The LiveLesson presents concepts in the context of fully tested programs, not code fragments. The LiveLesson features hundreds of complete Java™ programs with thousands of lines of proven Java™ code, and hundreds of tips that will help you build robust applications.

The source code repository for this LiveLesson can be found at www.informit.com/title/9780133489347.

The code for the JPMS section can be found at http://ptgmedia.pearsoncmg.com/imprint_downloads/informit/downloads/jpmsfilesforjavall.zip.

Paul J. Deitel, CEO and Chief Technical Officer of Deitel & Associates, Inc., is a graduate of MIT, where he studied Information Technology. He holds the Sun (now Oracle) Certified Java Programmer and Certified Java Developer certifications, and is an Oracle Java Champion. Through Deitel & Associates, Inc., he has delivered Java, C#, Visual Basic, C++, C and Internet programming courses to industry clients, including Cisco, IBM, Sun Micro systems, Dell, Siemens, Lucent Technologies, Fidelity, NASA at the Kennedy Space Center, the National Severe Storm Laboratory, White Sands Missile Range, Rogue Wave Software, Boeing, SunGard Higher Education, Stratus, Cambridge Technology Partners, One Wave, Hyperion Software, Adra Systems, Entergy, CableData Systems, Nortel Networks, Puma, iRobot, Invensys and many more. He and his co-author, Dr. Harvey M. Deitel, are the world’s best-selling programming-language textbook/professional book authors.

Skill Level

Beginner-to-Intermediate

What you Will Learn

Start with an introduction to Java™ using an early classes and objects approach, then rapidly move on to more advanced topics, including GUI, graphics, exception handling, lambdas, streams, functional interfaces, object serialization, concurrency, generics, generic collections, JDBC™ and more. You’ll enjoy Deitels’ classic treatment of object-oriented programming and the object-oriented design ATM case study, including a complete Java™ implementation. And new to this LiveLesson is detailed coverage of JShell, Java 9’s REPL (Read-Eval-Print-Loop) for interactive Java. When you’re finished, you’ll have everything you need to build industrial-strength object-oriented Java applications.

Practical, Example-Rich Coverage of:

  • Java™ SE 7 and SE 8
  • JShell, Java 9’s REPL (Read-Eval-Print-Loop) for interactive Java
  • Lambdas, Streams, Functional Interfaces with Default and Static Methods
  • Classes, Objects, Encapsulation, Inheritance, Polymorphism, Interfaces
  • Swing and JavaFX GUIs; Graphics
  • Integrated Exception Handling
  • Files, Streams, Object Serialization
  • Multithreading and Concurrency for Optimal Multi-Core Performance
  • Generics and Generic Collections
  • Database (JDBC™, SQL and JavaDB)
  • Using the Debugger and the API Docs
  • Industrial-Strength, Object-Oriented Design ATM Case Study and more.

Introducing the Java Platform Module System (JPMS)—Java 9’s most important new software-engineering technology. Modularity—the result of Project Jigsaw—helps developers at all levels be more productive as they build, maintain and evolve software systems, especially large systems. The key goals of JPMS include: reliable configuration, strong encapsulation, scalable Java Platform, greater platform integrity, and improved performance.

JShell is one of Java’s most significant new learning, discovery and developer-productivity-enhancement features since Java’s inception 20+ years ago. JShell—Java’s REPL (read-evaluate-print loop) provides a fast and friendly environment that enables you to interactively explore, discover and experiment with Java language features and its extensive libraries.

Who should take this course?

Programmers experienced in a high-level programming language and interested in building industrial-strength applications in Java

Course requirements

Familiarity with any high-level programming language, including C, C++, C#, JavaScript, etc.

Table of contents

  1. Part I
    1. Java Fundamentals: Introduction to Part I
  2. Before You Begin: Setting Up Your Development Environment
    1. Overview
    2. Software Used
    3. Installing the JDK (Required)
    4. Installing Eclipse (Optional)
    5. Installing IntelliJ IDEA
    6. Downloading the Code Examples and Contacting Me for Help
  3. Dive Into NetBeans: Using NetBeans to Compile Exiting Programs and Create New Ones (Optional)
    1. Overview
    2. Getting NetBeans, opening the IDE and configuring tabs and line numbers
    3. Creating a project and adding existing code to the project
    4. Creating a new program
  4. Dive Into Eclipse: Using Eclipse to Compile Exiting Programs and Create New Ones (Optional)
    1. Overview
    2. Getting Eclipse, opening the IDE and configuring tabs and line numbers
    3. Creating a project and adding existing code to the project
    4. Creating a new program
  5. Dive Into IntelliJ IDEA: Using NetBeans to Compile Exiting Programs and Create New Ones (Optional)
    1. Overview
    2. Getting IntelliJ, opening the IDE and configuring tabs and line numbers
    3. Creating a project and adding existing code to the project
    4. Creating a new program
  6. Lesson 1: Test Driving a Java Program at the Command Line
    1. Introduction
    2. Test-Driving the command line
  7. Lesson 2: Introduction to Java Applications
    1. Introduction
    2. Text-printing program
    3. Printing a line of text with multiple statements
    4. Printing multiple lines of text with a single statement
    5. Displaying multiple lines with method System.out.printf
    6. Addition program and an Introduction to using the online Java documentation
    7. Compare integers using if statements, relational operators and equality operators
  8. Lesson 3: Introduction to Classes, Objects, Methods and Strings
    1. Introduction
    2. Account class that contains a name instance variable and methods to set and get its value
    3. Creating and manipulating an Account object
    4. Conceptual view of an Account object
    5. Primitive Types vs. Reference Types
    6. Account class with a constructor that initializes the name instance variable
    7. Using the Account constructor to initialize the name instance variable when each Account object is created
    8. Account class with a double instance variable balance and a constructor and deposit method that perform validation
    9. Inputting and outputting floating-point numbers with Account objects
  9. Lesson 4: Control Statements, Part 1
    1. Introduction
    2. Student Class: Nested if...else Statements
    3. Calculating a class average using the while statement and counter-controller repetition
    4. Calculating a class average using the while statement and sentinel-controller repetition
    5. Arithmetic assignment operators
    6. Prefix increment and postfix increment operators
  10. Lesson 5: Control Statements, Part 2
    1. Introduction
    2. Compound-interest calculations with for
    3. do...while repetition statement
    4. LetterGrades class that uses the switch statement to count letter grades
    5. Demonstrating Strings in switch—Class that represents an auto insurance policy
    6. break statement exiting a for statement
    7. continue statement terminating an iteration of a for statement
    8. Logical operators
  11. Lesson 6: Methods—A Deeper Look
    1. Introduction
    2. static Methods, static Fields and Class Math
    3. Programmer-declared method maximum with three double parameters
    4. Argument Promotion and Casting
    5. Java API Packages
    6. Shifted and scaled random integers
    7. Roll a six-sided die 6,000,000 times
    8. Craps class simulates the dice game craps
    9. Scope class demonstrates field and local-variable scopes
    10. Overloaded method declarations
  12. Lesson 7:Arrays
    1. Introduction
    2. Initializing the elements of an array to default values of zero
    3. Initializing the elements of an array with an array initializer
    4. Calculating the values to be placed into the elements of an array
    5. Computing the sum of the elements of an array
    6. Bar chart printing program
    7. Die-rolling program using arrays instead of switch
    8. Poll analysis program
    9. Card shuffling and dealing
    10. Using the enhanced for statement to total integers in an array
    11. Passing arrays and individual array elements to methods
    12. GradeBook class using an array to store test grades
    13. Initializing two-dimensional arrays
    14. GradeBook class using a two-dimensional array to store grades
    15. Using variable-length argument lists
    16. Initializing an array using command-line arguments
    17. Arrays class methods and System.arraycopy
    18. Generic ArrayListT collection demonstration
  13. Part II
    1. Java Fundamentals I, II, III, and IV LiveLessons: Introduction to Part II
  14. Lesson 8: Classes and Objects—A Deeper Look
    1. Introduction
    2. Time1 class declaration maintains the time in 24-hour format
    3. Private members of class Time1 are not accessible
    4. “this” used implicitly and explicitly to refer to members of an object
    5. Time2 class with overloaded constructors
    6. Composition demonstration with classes Date and Employee
    7. Declaring an enum type with a constructor and explicit instance fields and accessors for these fields
    8. Garbage Collection
    9. Declaring and using static variables and methods to maintain a count of the number of Employee objects in memory
    10. static import of Math class methods
    11. Package access members of a class are accessible by other classes in the same package
    12. Compound-interest calculations with BigDecimal
  15. Lesson 9: Object-Oriented Programming—Inheritance
    1. Introduction
    2. Inheritance hierarchy UML class diagrams
    3. Creating and using a CommissionEmployee class
    4. Creating and Using a BasePlusCommissionEmployee Class
    5. Creating a CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy
    6. CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy Using protected Instance Variables
    7. CommissionEmployee—BasePlusCommissionEmployee Inheritance Hierarchy Using private Instance Variables
    8. Class Object
  16. Lesson 10: Object-Oriented Programming—Polymorphism
    1. Introduction
    2. Demonstrating Polymorphic Behavior—Assigning superclass and subclass references to superclass and subclass variables
    3. Abstract Classes and Methods
    4. Case Study: Payroll System Using Polymorphism
    5. Abstract Superclass Employee
    6. Concrete Subclass SalariedEmployee
    7. Concrete Subclass HourlyEmployee
    8. Concrete Subclass CommissionEmployee
    9. Indirect Concrete Subclass BasePlusCommissionEmployee
    10. Polymorphic Processing, Operator instanceof and Downcasting
    11. final Methods and Classes
    12. Creating and Using Interfaces (Java SE 7 and earlier)
    13. Developing a Payable Hierarchy
    14. Class Invoice
    15. Modifying Class Employee to Implement Interface Payable
    16. Modifying Class SalariedEmployee for Use in the Payable Hierarchy
    17. Using Interface Payable to Process Invoices and Employees Polymorphically
    18. Java SE 8 Interface Enhancements overview
  17. Lesson 11: Exception Handling—A Deeper Look
    1. Introduction
    2. Integer division without exception handling
    3. Handling ArithmeticExceptions and InputMismatchExceptions
    4. Throwable hierarchy; Introduction to checked and unchecked exceptions
    5. try...catch...finally exception-handling mechanism
    6. Stack unwinding and obtaining data from an exception object
    7. Chained exceptions
    8. Declaring new exception types
    9. Checking with assert that a value is within range
    10. try-with-Resources: Automatic Resource Deallocation
  18. Lesson 12: GUI Components: Part 1
    1. Introduction
    2. Using Java’s Nimbus Look-and-Feel
    3. Simple GUI-Based Input/Output with JOptionPane
    4. Common superclasses of the lightweight Swing components
    5. Displaying Text and Images in a Window
    6. Text Fields and an Introduction to Event Handling with the ActionListener interface Nested Classes
    7. Common GUI Event Types and Listener Interfaces
    8. How Event Handling Works
    9. JButton
    10. Buttons That Maintain State: JCheckBox and the ItemListener interface
    11. Buttons That Maintain State: JRadioButton and the ItemListener interface
    12. JComboBox and the ItemListener interface; Using an Anonymous Inner Class for Event Handling
    13. JList and the ListSelectionListener interface
    14. Multiple-Selection Lists
    15. Mouse Event Handling with the MousListener and MouseMotionListener interfaces
    16. Adapter Classes in Event Handling: Mouse Event Handling with the MouseAdapter class
    17. Custom JPanels
    18. Key Event Handling
    19. FlowLayout
    20. BorderLayout
    21. GridLayout
    22. Using Panels to Manage More Complex Layouts
    23. JTextArea and JScrollPane
  19. Lesson 13: Graphics and Java 2D
    1. Introduction
    2. Color control: Drawing rectangles and strings in various colors
    3. Choosing colors with JColorChooser
    4. Displaying strings in different fonts and colors
    5. FontMetrics and Graphics methods useful for obtaining font metrics
    6. Drawing lines, rectangles and ovals
    7. Drawing arcs with Graphics methods drawArc and fillArc
    8. Drawing polygons with Graphics methods drawPolygon and fillPolygon
    9. Demonstrating Java 2D shapes
    10. Java 2D general paths and rotating/translating Java 2D shapes
  20. Lesson 14: Strings, Characters and Regular Expressions
    1. Introduction
    2. String class constructors
    3. String methods length, charAt and getChars
    4. Comparing Strings: String methods equals, equalsIgnoreCase, compareTo and regionMatches
    5. Comparing Strings: String methods startsWith and endsWith
    6. String-searching methods indexOf and lastIndexOf
    7. Extracting substrings from Strings: String class substring methods
    8. String method concat
    9. String methods replace, toLowerCase, toUpperCase, trim and toCharArray
    10. String valueOf methods
    11. StringBuilder constructors
    12. StringBuilder length, setLength, capacity and ensureCapacity methods
    13. StringBuilder methods charAt, setCharAt, getChars and reverse
    14. StringBuilder append methods
    15. StringBuilder methods insert, delete and deleteCharAt
    16. Character static methods for testing characters and converting case
    17. Character class static conversion methods
    18. Character class instance methods
    19. StringTokenizer object used to tokenize strings
    20. Validating user input with regular expressions
    21. String methods replaceFirst, replaceAll and split
    22. Classes Pattern and Matcher
  21. Lesson 15: Files, Streams and Object Serialization
    1. Introduction
    2. Obtaining file and directory information
    3. Writing data to a sequential text file with class Formatter
    4. Reading from a sequential text file using a Scanner
    5. Credit-inquiry program
    6. Creating a Sequential-Access File Using Object Serialization
    7. Reading and Deserializing Data from a Sequential-Access File
    8. Opening Files with JFileChooser
  22. Part III
    1. Java Fundamentals I, II, III, and IV LiveLessons: Introduction to Part III
  23. Lesson 16: Generic Collections
    1. Introduction
    2. Manipulating lists with List, ArrayList, Collection and Iterator
    3. Manipulating lists with List, LinkedList and ListIterator
    4. Viewing arrays as Lists and converting Lists to arrays
    5. Collections method sort
    6. Collections method sort with a Comparator object
    7. Collections method sort with a custom Comparator object
    8. Card shuffling and dealing with Collections method shuffle
    9. Collections methods reverse, fill, copy, max and min
    10. Collections method binarySearch
    11. Collections methods addAll, frequency and disjoint
    12. HashSet used to remove duplicate values from an array of strings
    13. Using SortedSets and TreeSets
    14. Using a Map to count the number of occurrences of each word in a String
  24. Lesson 17: Java SE 8 Lambdas and Streams
    1. Introduction
    2. Functional Programming
    3. Functional Interfaces
    4. Lambda Expressions
    5. Streams
    6. IntStream Operations: Creating an IntStream and Displaying Its Values with the forEach Terminal Operation
    7. IntStream Operations: Terminal Operations count, min, max, sum and average
    8. IntStream Operations: Terminal Operation reduce
    9. IntStream Intermediate Operations: Filtering and Sorting IntStream Values
    10. IntStream Intermediate Operation: Mapping
    11. IntStream Operations: Creating Streams of ints with IntStream Methods range and rangeClosed
    12. StreamInteger Manipulations
    13. StreamString Manipulations
    14. StreamEmployee Manipulations: Creating and Displaying a ListEmployee
    15. StreamEmployee Manipulations: Filtering Employees with Salaries in a Specified Range
    16. StreamEmployee Manipulations: Sorting Employees By Multiple Fields
    17. StreamEmployee Manipulations: Mapping Employees to Unique Last Name Strings
    18. StreamEmployee Manipulations: Grouping Employees By Department
    19. StreamEmployee Manipulations: Counting the Number of Employees in Each Department
    20. StreamEmployee Manipulations: Summing and Averaging Employee Salaries
    21. Creating a StreamString from a File
    22. Generating Streams of Random Values: Rolling a die 6,000,000 times
    23. Lambda Event Handlers
    24. Additional Notes on Java SE 8 Interfaces
  25. Lesson 18: Generic Classes and Methods
    1. Introduction
    2. Overloaded method that perform the exact same task for different types
    3. Generic Methods: Implementation and Compile-Time Translation
    4. Additional Compile-Time Translation Issues: Methods That Use a Type Parameter as the Return Type
    5. Generic Classes: Implementing a Generic Stack Class
    6. Creating Generic Methods to Test Class StackT
    7. Wildcards in Methods That Accept Type Parameters: Totaling the the numbers in an ArrayListNumber
    8. Wildcards in Methods That Accept Type Parameters: Implementing Method sum with a Wildcard Type Argument in Its Parameter
  26. Lesson 19: GUI Components, Part 2
    1. Introduction
    2. JSlider
    3. Using menus with JFrames
    4. JPopupMenu
    5. Pluggable look-and-feel
    6. Multiple-document interfaces with JDesktopPane and JinternalFrame
    7. JTabbedPane
    8. BoxLayout layout manager
    9. GridBagLayout Layout Manager
    10. GridBagLayout Layout Manager: Using GridBagConstraints RELATIVE and REMAINDER
  27. Lesson 20: Concurrency and Multi-core Progamming
    1. Introduction
    2. Concurrent programming overview
    3. Thread States and Life Cycle
    4. Creating and Executing Threads with the Executor Framework
    5. Thread Synchronization Overview
    6. Unsynchronized Mutable Data Sharing (Not thread safe)
    7. Synchronized Mutable Data Sharing—Making Operations Atomic
    8. Producer/Consumer Relationship without Synchronization (Not thread safe)
    9. Producer/Consumer Relationship: ArrayBlockingQueue
    10. (Advanced) Producer/Consumer Relationship with synchronized, wait, notify and notifyAll
    11. (Advanced) Producer/Consumer Relationship: Bounded Buffers
    12. (Advanced) Producer/Consumer Relationship: The Lock and Condition Interfaces
    13. Performing Computations in a Worker Thread: Fibonacci Numbers
    14. Processing Intermediate Results: Sieve of Eratosthenes
    15. sort/parallelSort Timings with the Java SE 8 Date/Time API
    16. Java SE 8: Sequential vs. Parallel Streams
    17. Executing Aysnchronous Tasks with CompletableFuture—Fibonacci calculations performed synchronously and asynchronously
  28. Lesson 21: Accessing Databases with JDBC
    1. Introduction
    2. Overview of relational database concepts
    3. Overview of the books database
    4. Basic SELECT Query
    5. WHERE Clause
    6. ORDER BY Clause
    7. Merging Data from Multiple Tables: INNER JOIN
    8. INSERT Statement
    9. UPDATE Statement
    10. DELETE Statement
    11. Java DB Overview
    12. Connecting to and Querying a Database
    13. Querying the books Database: Test-Driving the Example
    14. Querying the books Database: Implementing the TableModel interface to populate a JTable from a ResultSet
    15. Querying the books Database: DisplayQueryResults class
    16. RowSet Interface and JdbcRowSet class
    17. PreparedStatements: Address book example
  29. Lesson 22: Java FX, Part 1
    1. Introduction
    2. Tools Used in This Lesson: FXML, JavaFX Scene Builder and the NetBeans IDE
    3. JavaFX App Window Structure
    4. Welcome App—Displaying Text and an Image
    5. Creating the App’s Project
    6. NetBeans Projects Window—Viewing the Project Contents and Adding an Image to the Project
    7. Opening JavaFX Scene Builder from NetBeans and Preparing to Build the Welcome App
    8. Changing to a VBox Layout Container and Configuring the Layout
    9. Adding and Configuring a Label
    10. Adding and Configuring an ImageView and Running the App
    11. Welcome.java—Creating the GUI from the FXML file
    12. Tip Calculator App Test Drive—Introduction to Event Handling
    13. Tip Calculator Technologies Overview
    14. Building the Tip Calculator App’s GUI: fx:id values for the app’s controls
    15. Building the Tip Calculator App’s GUI: Creating the project
    16. Building the Tip Calculator App’s GUI, Step 1: Changing the Root Layout from an AnchorPane to a GridPane
    17. Building the Tip Calculator App’s GUI, Step 3: Adding the Controls to the GridPane
    18. Building the Tip Calculator App’s GUI, Step 4: Right-Aligning GridPane Column 0’s Contents
    19. Building the Tip Calculator App’s GUI, Step 5: Sizing the GridPane Columns to Fit Their Contents
    20. Building the Tip Calculator App’s GUI, Step 7: Sizing the Button and Previewing the GUI
    21. Building the Tip Calculator App’s GUI, Step 8: Configuring the GridPane’s Padding and Horizontal Gap Between Its Columns
    22. Building the Tip Calculator App’s GUI, Step 9: Making the tipTextField and totalTextField Uneditable and Not Focusable
    23. Building the Tip Calculator App’s GUI, Step 10: Setting the Slider’s Properties and Previewing the Final Layout
    24. TipCalculator Subclass of Application
    25. TipCalculatorController Class: import Statements
    26. TipCalculatorController Class: static Variables and Instance Variables
    27. TipCalculatorController Class: calculateButtonPressed Event Handler
    28. TipCalculatorController Class: initalize Method
  30. Part IV
    1. Java Fundamentals: Introduction to Part IV
  31. Lesson 23: Java FX GUI: Part 2
    1. Lesson Introduction
    2. NetBeans and JavaFX Scene Builder Downloads
    3. Laying Out Nodes in a Scene Graph
    4. Painter App: Technologies Overview
    5. Painter App: Creating the Project and Building the GUI
    6. Painter App: Painter Subclass of Application
    7. Painter App: PainterController Class
    8. Color Chooser App: Technologies Overview
    9. Color Chooser App: GUI Overview
    10. Color Chooser App: ColorChooser and ColorChooserController classes
    11. Cover Viewer App: Technologies Overview
    12. Cover Viewer App: Adding the Images and the Book class; GUI Overview
    13. Cover Viewer App: CoverViewer and CoverViewerController classes
    14. Cover Viewer App: Customizing ListView Cells Technologies Overview
    15. Cover Viewer App: Copying the Project
    16. Cover Viewer App: ImageTextCell Custom Cell Factory Class
    17. Cover Viewer App: CoverViewerController Class
  32. Lesson 24: Java FX Graphics and Multimedia
    1. Lesson Introduction
    2. FontCSS App: Using External Stylesheets to Style Labels and a VBox
    3. Programmatically Loading CSS
    4. BasicShapes App: Defining Two-Dimensional Shapes with FXML
    5. BasicShapes App: CSS That Styles the Two-Dimensional Shapes
    6. PolyShapes App: GUI and CSS for a Polyline, Polygon and Path
    7. PolyShapes App: PolyshapesController Class
    8. DrawStars App: Applying Transforms to Nodes
    9. VideoPlayer App: Playing Video with Classes Media, MediaPlayer and MediaViewer
    10. TransitionAnimations App: Predefined Animations for Modifying Specific Properties
    11. TimelineAnimation App: Custom Transitions Specified with KeyFrames
  33. Lesson 25: Java Persistence API (JPA)
    1. Lesson Introduction
    2. JPA Overview—Generated Entity Classes
    3. JPA Overview—Relationships Between Tables in the Entity Classes
    4. JPA Overview—javax.persistence Package
    5. Querying a Database with JPA—Creating the Java DB Database
    6. Querying a Database with JPA—Populate the books Database with Sample Data
    7. Querying a Database with JPA—Creating the Java Project
    8. Querying a Database with JPA—Adding the JPA and Java DB Libraries
    9. Querying a Database with JPA—Creating the Persistence Unit for the books Database
    10. Querying a Database with JPA—Querying the Authors Table
    11. Querying a Database with JPA—JPA Features of Autogenerated Class Authors
    12. Named Queries; Accessing Data from Multiple Tables—Using a Named Query to Get the List of Authors, then Display the Authors with Their ISBNs
    13. Named Queries; Accessing Data from Multiple Tables—Using a Named Query to Get the List of Titles, then Display Each with Its Authors
    14. Address Book: Using JPA and Transactions to Modify a Database—Transaction Processing
    15. Address Book: Using JPA and Transactions to Modify a Database—Creating the AddressBook Database and Its Persistence Unit
    16. Address Book: Using JPA and Transactions to Modify a Database—Addresses Entity Class
    17. Address Book: Using JPA and Transactions to Modify a Database—AddressBook Class
    18. Address Book: Using JPA and Transactions to Modify a Database—Other JPA Operations
  34. Lesson 26: JavaServer Faces (JSF) Web Apps: Part 1
    1. Lesson Introduction
    2. JavaServer Faces Setup/Software
    3. Web Basics
    4. Multitier Application Architecture
    5. Your First JSF Web App
    6. The Default index.xhtml Document: Introducing Facelets and JSF Expression Language
    7. JavaBeans, Properties and the WebTimeBeanClass
    8. Additional Notes on the WebTime Example
    9. Model-View-Controller (MVC) Architecture in JSF Apps
    10. Common JSF View Components
    11. Validation Using JSF Standard Validators
    12. Session Tracking with
  35. Lesson 27: JavaServer Faces (JSF) Web Apps: Part 2
    1. Lesson Introduction
    2. AddressBook: Accessing Databases in Web Apps
    3. AddressBook: Setting Up the Database
    4. AddressBook: Class AddressBean
    5. AddressBook: index.xhtml Facelets Page
    6. AddressBook: addEntry.xhtml Facelets Page
    7. Ajax Introduction
    8. Validation App: Adding Ajax Functionality
  36. Lesson 28: Web Services
    1. Lesson Introduction
    2. Web Service Basics
    3. Simple Object Access Protocol (SOAP) Introduction
    4. Representational State Transfer (REST) Introduction
    5. JavaScript Object Notation (JSON) Introduction
    6. Publishing and Consuming SOAP-Based Web Services
    7. Publishing and Consuming SOAP-Based Web Services: Creating a Web Application and Adding a Web Service
    8. Publishing and Consuming SOAP-Based Web Services: Defining the WelcomeSOAP Web Service in NetBeans
    9. Publishing and Consuming SOAP-Based Web Services: Publishing the WelcomeSOAP Web Service from NetBeans
    10. Publishing and Consuming SOAP-Based Web Services: Testing the WelcomeSOAP Web Service with GlassFish’s Tester Web Page
    11. Publishing and Consuming SOAP-Based Web Services: Describing the WelcomeSOAP Web Service with Web Service Description Language (WSDL)
    12. Publishing and Consuming SOAP-Based Web Services: Creating a Client to Consume the WelcomeSOAP Web Service
    13. Publishing and Consuming SOAP-Based Web Services: Consuming the WelcomeSOAP Web Service
    14. Publishing and Consuming REST-Based XML Web Services
    15. Publishing and Consuming REST-Based XML Web Services: Creating a REST-Based XML Web Service
    16. Publishing and Consuming REST-Based XML Web Services: Consuming a REST-Based XML Web Service
    17. Publishing and Consuming REST-Based JSON Web Services: Creating a REST-Based JSON Web Service
    18. Publishing and Consuming REST-Based JSON Web Services: Consuming a REST-Based JSON Web Service
    19. SOAP-Based Web Service with Session Tracking Support
    20. SOAP-Based Web Service That Accesses a Database
    21. REST-Based XML Equation Generator Web Service
    22. REST-Based JSON Equation Generator Web Service
  37. Lesson: Introduction to JShell
    1. Lesson intro
    2. How to use this lesson
    3. Before You Begin: Installing and Configuring JDK 9 on Windows
    4. Before You Begin: Installing and Configuring JDK 9 on macOS
    5. Before You Begin: Installing and Configuring JDK 9 on Linux
    6. JShell Overview
  38. SECTION 1: Videos in this section can be viewed after Lesson 2
    1. Starting a JShell session
    2. Executing statements
    3. Declaring variables explicitly; compilation errors; recalling and reexecuting snippets
    4. Listing and executing prior snippets
    5. Evaluating expressions and declaring variables implicitly
    6. Using implicitly declared variables
    7. Viewing a variable’s value
    8. Resetting a JShell session
    9. Writing multiline statements
    10. Editing code snippets
    11. Exiting JShell
  39. SECTION 2: Videos in this section can be viewed after Lesson 3
    1. Creating a class in JShell and viewing the declared types
    2. Explicitly declaring reference-type variables
    3. Creating objects and implicitly declaring reference-type variables
    4. Manipulating objects
    5. Creating a meaningful variable name for an expression
    6. Saving and opening code-snippet files
  40. SECTION 3: Videos in this section can be viewed after Lesson 3
    1. Auto-completing identifiers
    2. Auto-completing JShell commands
  41. SECTION 4: Videos in this section can be viewed after Lesson 6
    1. Exploring a class’s members and viewing documentation
    2. Listing class Math’s static members
    3. Viewing a method’s parameters
    4. Viewing a method’s documentation
    5. Viewing a public field’s documentation
    6. Viewing a class’s documentation
    7. Viewing method overloads
    8. Exploring members of a specific object
  42. SECTION 5: Videos in this section can be viewed after Lesson 6
    1. Declaring and using a method
    2. Forward referencing an undeclared method—Declaring method displayCubes
    3. Declaring a previously undeclared method
    4. Testing method cube and replacing its declaration
    5. Testing updated method cube and method displayCubes
  43. SECTION 6: Videos in this section can be viewed after Lesson 7
    1. Exception handling in JShell
  44. SECTION 7: The videos in this lesson may be covered in sequence any time after Lesson 8
    1. Importing classes and adding packages to the CLASSPATH
    2. Using an external editor
    3. Summary of JShell Commands
    4. Getting help in JShell
    5. /reload command
    6. Feedback modes
    7. How JShell reinterprets Java for interactive use
  45. SECTION 8: Exercises for Section 2
    1. Exercses 1 and 2: Printing a string does not display quotes
    2. Exercses 3 and 4: Comments are not executable
    3. Exercise 5: Multiline comments continue until a closing */ is reached
    4. Exercise 6: Code indentation does not affect how the code executes
    5. Exercise 7: Declaring valid and invalid identifiers
    6. Exercise 8: Unmatched braces in string literals are allowed
    7. Exercise 9: Viewing compilation errors for common programming errors
    8. Exercise 10: Using multiple print statements to display text on one line; Saving/opening snippet files
    9. Exercise 11: Using multiple println statements to display text on separate lines
    10. Exercise 12: Resetting a JShell session
    11. Exercises 13-15: \n, \t and illegal escape sequences
    12. Exercises 16-18: \\, \“ and \r escape sequences
    13. Exercise 19: Demonstrating various compilation errors and exceptions with System.out.printf
    14. Exercises 20-21: The /imports command and declaring an import statement inside a class
    15. Exercise 22: Proving that Java is case sensitive
    16. Exercise 23: Proving variables were initialized properly
    17. Exercise 24: Adding 1 to the largest int value and subtracting 1 from the smallest int value
    18. Exercise 25: Using _ in numeric literals
    19. Exercise 26: Spaces are not required around binary operators
    20. Exercise 27: Demonstrating that parentheses are not required around an argument to printf statement
    21. Exercises 28-29: Assigning to a variable is destructive and printing a variable is non-destructive
    22. Exercise 30: Multiplication requires an operator in Java
    23. Exercises 31-32: Integer division and division by zero
    24. Exercises 33-34: Operator precedence and associativity
    25. Exercises 35-37: Testing the relation and equality operators
    26. Exercise 38: Accidentally following an if statement’s condition with a semicolon
    27. Exercise 39: Demonstrating concatenated assignments
    28. Exercise 40: Forcing order of evaluation with parentheses
  46. Lesson: Introduction to Modularity—Java 9’s Platform Module System (JPMS)
    1. Lesson Introduction
    2. Before You Begin
  47. SECTION 1: Introduction
    1. Introduction
    2. Introduction—What is a Module?
    3. Introduction—History
    4. Introduction—JPMS Goals
    5. Introduction—Lab 01: Listing the JDK’s Modules
    6. Introduction—JEPs and JSRs of Java Modularity
  48. SECTION 2: Module Declarations
    1. Module Declarations—Section Overview
    2. Module Declarations
    3. Module Declarations—requires
    4. Module Declarations—requires transitive and Implied Readability
    5. Module Declarations—exports and exports...to
    6. Module Declarations—uses
    7. Module Declarations—provides...with
    8. Module Declarations—open, opens, opens...to
    9. Module Declarations—Restricted Keywords
  49. SECTION 3: Modularized Welcome App
    1. Modularized Welcome App—Section Overview
    2. Modularized Welcome App—App Structure
    3. Modularized Welcome App—Lab 02: Listing the java.base Module’s Contents
    4. Modularized Welcome App—Class Welcome
    5. Modularized Welcome App—Lab 03: module-info.java
    6. Modularized Welcome App—Lab 04: Module-Dependency Graph
    7. Modularized Welcome App—Lab 05: Compiling a Module
    8. Modularized Welcome App—Lab 06/07: Listing the com.deitel.welcome Module’s Description
    9. Modularized Welcome App—Lab 08: Running an app from a Module’s Exploded Folders
    10. Modularized Welcome App—Lab 09: Packaging a Module in a Modular JAR File
    11. Modularized Welcome App—Lab 10: Running the App from a Modular JAR File
    12. Modularized Welcome App—Aside: Classpath vs. Module Path
  50. SECTION 4: Creating and Using a Custom Module
    1. Creating and Using a Custom Module—Section Overview
    2. Creating and Using a Custom Module—Lab 11: Exporting a Package for Use in Other Modules
    3. Creating and Using a Custom Module—Lab 11: Using a Class from a Package in Another Module
    4. Creating and Using a Custom Module—Lab 12: Module Dependency Graphs
    5. Creating and Using a Custom Module—Lab 13/14/15: Compiling and Running the Example
    6. Creating and Using a Custom Module—Lab 16/17: Packaging the App Into Modular JAR Files
    7. Creating and Using a Custom Module—Lab 18: Strong Encapsulation and the Accessibility of Types
  51. SECTION 5: Module-Dependency Graphs: A Deeper Look
    1. Module-Dependency Graphs: A Deeper Look—Section Overview
    2. Module-Dependency Graphs: A Deeper Look—Lab 19: java.sql
    3. Module-Dependency Graphs: A Deeper Look—Lab 20: java.se
    4. Module-Dependency Graphs: A Deeper Look—Browsing the JDK Module Graph
    5. Module-Dependency Graphs: A Deeper Look—Lab21/22: Error from a Module Graph with a Cycle
  52. SECTION 6: Using Pre-Java-9 Non-Modularized Code in Java 9
    1. Using Pre-Java-9 Non-Modularized Code in Java 9—Section Overview
    2. Using Pre-Java-9 Non-Modularized Code in Java 9—Unnamed Module
    3. Using Pre-Java-9 Non-Modularized Code in Java 9—Automatic Modules
    4. Using Pre-Java-9 Non-Modularized Code in Java 9—Labs 23/24/25/26: jdeps Java Dependency Analysis Tool
  53. SECTION 7: Resources in Modules; Using an Automatic Module
    1. Resources in Modules; Using an Automatic Module—Section Overview
    2. Resources in Modules; Using an Automatic Module
    3. Resources in Modules; Using an Automatic Module—Automatic Module controlsfx
    4. Resources in Modules; Using an Automatic Module—Requiring Multiple Modules
    5. Resources in Modules; Using an Automatic Module—Module-Dependency Graph
    6. Resources in Modules; Using an Automatic Module—Compiling the Module
    7. Resources in Modules; Using an Automatic Module—Running the Modularized App
    8. Resources in Modules; Using an Automatic Module—Showing the Exceptions that Occur if package com.deitel.videoplayer is Not Opened to the Correct JavaFX Modules
  54. SECTION 8: Creating Custom Runtimes with jlink
    1. Creating Custom Runtimes with jlink—Section Overview
    2. Creating Custom Runtimes with jlink—Listing the JRE’s Modules
    3. Creating Custom Runtimes with jlink—Custom Runtime Containing Only java.base
    4. Creating Custom Runtimes with jlink—Creating a Custom Runtim for the Welcome App, Listing Its Modules and Running the App from the Custom Runtime
    5. Creating Custom Runtimes with jlink—Using the Module Resolver on a Custom Runtime
  55. SECTION 9: Services and ServiceLoader
    1. Services and ServiceLoader—Section Overview
    2. Services and ServiceLoader
    3. Services and ServiceLoader—Service-Provider Interface
    4. Services and ServiceLoader—Loading and Consuming Service Providers
    5. Services and ServiceLoader—uses Module Directive and Service Consumers
    6. Services and ServiceLoader—Running the App with No Service Providers
    7. Services and ServiceLoader—Implementing a Service Provider
    8. Services and ServiceLoader—provides...with Module Directive and Declaring a Service Provider
    9. Services and ServiceLoader—Running the App with One Service Provider
    10. Services and ServiceLoader—Implementing a Second Service Provider
    11. Services and ServiceLoader—Running the App with Both Service Providers
    12. Myths of JPMS
    13. Additional Resources

Product information

  • Title: Java 8 Fundamentals: Modern Java Development with Lambdas, Streams, and Introducing Java 9’s JShell and the Java Platform Module System (JPMS)
  • Author(s):
  • Release date: July 2017
  • Publisher(s): Prentice Hall
  • ISBN: 0133489353