𝔖 Scriptorium
✦   LIBER   ✦

📁

Java Programming Exercises: Volume Two: Java Standard Library

✍ Scribed by Christian Ullenboom


Publisher
Chapman and Hall/CRC
Year
2024
Tongue
English
Leaves
323
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Take the next step in raising your coding skills and dive into the intricacies of Java Standard Libraries. You will continue to raise your coding skills, and test your Java knowledge on tricky programming tasks, with the help of the pirate Captain CiaoCiao. This is the second of two volumes which provide you with everything you need to excel in your Java journey, including tricks that you should know in detail as a professional, as well as intensive training for clean code and thoughtful design that carries even complex software.

Features:

    • 149 tasks with commented solutions on different levels

    • For all paradigms: object-oriented, imperative, and functional

    • Clean code, reading foreign code, and object-oriented modeling

    With numerous best practices and extensively commented solutions to the tasks, these books provide the perfect workout for professional software development with Java.

    ✦ Table of Contents


    Cover
    Half Title
    Title Page
    Copyright Page
    Table of Contents
    About the Author
    Introduction
    Previous Knowledge and Target Audience
    Working with the Book
    The Suggested Solutions
    Use of the Book
    Required Software
    Used Java Version in the Book
    JVM
    Development Environment
    Conventions
    Helping Captain CiaoCiao and Bonny Brain
    1 Advanced String Processing
    Format Strings
    Build ASCII Table
    Aligned Outputs
    Regular Expressions and Pattern Recognition
    Quiz: Define Regex
    Determine Popularity in Social Media
    Detect Scanned Values
    Quiet Please! Defuse Shouting Texts
    Converting Time from AM/PM Format to 24-Hour Format
    Decompose Strings into Tokens
    Split Address Lines with the StringTokenizer
    Split Sentences into Words and Reverse Them
    Check Relations between Numbers
    Convert A1 Notation to Columns and Rows
    Parse Simple CSV Files with Coordinates
    Compress Strings Lossless by Runlength Encoding
    Character Encodings and Unicode Collation Algorithm
    Quiz: Encoding for Unicode Characters
    Quiz: Order of Strings with and without Collator
    Suggested Solutions
    Build ASCII Table
    Aligned Outputs
    Quiz: Define Regex
    Determine Popularity in Social Media
    Detect Scanned Values
    Quiet Please! Defuse Shouting Texts
    Converting Time from AM/PM Format to 24-Hour Format
    Split Address Lines with the StringTokenizer
    Split Sentences into Words and Reverse Them
    Check Relations between Numbers
    Convert A1 Notation to Columns and Rows
    Parse Simple CSV Files with Coordinates
    Compress Strings Lossless by Runlength Encoding
    Quiz: Encoding for Unicode Characters
    Quiz: Order of Strings with and without Collator
    2 Mathematics
    The Class Math
    Quiz: Rule of Thumb
    Check If Tin Tin Cheated on Rounding
    Huge and Very Precise Numbers
    Calculate Arithmetic Mean of a Large Integer
    Number by Number over the Phone
    Develop Class for Fractions and Truncate Fractions
    Suggested Solutions
    Quiz: Rule of Thumb
    Check If Tin Tin Cheated on Rounding
    Calculate Arithmetic Mean of a Large Integer
    Number by Number over the Phone
    Develop Class for Fractions and Truncate Fractions
    3 Locale, Date, and Time
    Languages and Countries
    Apply Country-/Language-Specific Formatting for Random Number
    Date and Time Classes
    Formatting Date Output in Different Languages
    On Which Day Does Sir Francis Beaufort Celebrate His Birthday?
    Find All Friday the 13th
    Get Average Duration of Karaoke Nights
    Parse Different Date Formats
    Suggested Solutions
    Apply Country-/Language-Specific Formatting for Random Number
    Formatting Date Output in Different Languages
    On Which Day Does Sir Francis Beaufort Celebrate His Birthday?
    Find All Friday the 13th
    Get Average Duration of Karaoke Nights
    Parse Different Date Formats
    4 Concurrent Programming with Threads
    Create Threads
    Create Threads for Waving and Flag Waving
    No More Waving Flags: End Threads
    Parameterize Runnable
    Execute and Idle
    Delay Execution by Sleeping Threads
    Watch File Changes by Threads
    Catch Exceptions
    Thread Pools and Results
    Using Thread Pools
    Get Last Modification of Web Pages
    Protect Critical Sections
    Writing Memories into a Poetry Album
    Thread Cooperation and Synchronization Helper
    Attending the Banquet with the Captains—Semaphore
    Swearing and Insulting—Condition
    Take Pens Out of Paintbox—Condition
    Play Rock, Paper, Scissors—CyclicBarrier
    Find the Fastest Runner—CountDownLatch
    Suggested Solutions
    Create Threads for Waving and Flag Waving
    No More Waving Flags: End Threads
    Parameterize Runnable
    Delay Execution by Sleeping Threads
    Watch File Changes by Threads
    Catch Exceptions
    Using Thread Pools
    Get Last Modification of Web Pages
    Writing Memories into a Poetry Album
    Attending the Banquet with the Captains—Semaphore
    Swearing and Insulting—Condition
    Take Pens Out of Paintbox—Condition
    Play Rock, Paper, Scissors—CyclicBarrier
    Find the Fastest Runner—CountDownLatch
    5 Data Structures and Algorithms
    The Types of the Collection API
    Quiz: Search for StringBuilder
    Lists
    Singing and Cooking: Traverse Lists and Check Properties
    Filter Comments from Lists
    Shorten Lists Because There Is No Downturn
    Eating with Friends: Compare Elements, Find Commonalities
    Check Lists for the Same Order of Elements
    And Now the Weather: Find Repeated Elements
    Generate Receipt Output
    Quiz: Arrays Decorated
    Quiz: Searched and Not Found
    Everything Tastes Better with Cheese: Insert Elements into Lists
    Quiz: With Nothing but Trouble
    Search Elements with the Iterator and Find Covid Cough
    Move Elements, Play Musical Chairs
    Programming a Question Game with Planets
    Sets
    Form Subsets, Find Common Elements
    Quiz: Great Swords
    Get All Words Contained in a Word
    Exclude Duplicate Elements with a UniqueIterator
    Map Keys to Values
    Convert Two-Dimensional Arrays to Map
    Convert Text to Morse Code and Vice Versa
    Remember Word Frequency with Associative Memory
    Read In and Read Out Colors
    Read in Names and Manage Lengths
    Find Missing Characters
    Calculate Number of Paths to the Three-Headed Monkey
    Manage Holidays in a Sorted Associative Store
    Quiz: Keys in a HashMap
    Determine Commonality: Party Set and Souvenir
    Properties
    Develop Convenient Properties Decorator
    Stack and Queues
    Program RPN Pocket Calculator
    BitSet
    Forget No Ship
    Find Duplicate Entries and Solve the Animal Chaos
    Thread-Safe Data Structures
    Loading Ship
    Handle Important Messages First
    If Used Up, Create a New One
    Suggested Solutions
    Quiz: Search for StringBuilder
    Singing and Cooking: Traverse Lists and Check Properties
    Filter Comments from Lists
    Shorten Lists Because There Is No Downturn
    Eating with Friends: Compare Elements, Find Commonalities
    Check Lists for the Same Order of Elements
    And Now the Weather: Find Repeated Elements
    Generate Receipt Output
    Quiz: Arrays Decorated
    Quiz: Searched and Not Found
    Everything Tastes Better with Cheese: Insert Elements into Lists
    Quiz: With Nothing but Trouble
    Search Elements with the Iterator and Find Covid Cough
    Move Elements, Play Musical Chairs
    Programming a Question Game with Planets
    Form Subsets, Find Common Elements
    Quiz: Great Swords
    Get All Words Contained in a Word
    Exclude Duplicate Elements with a UniqueIterator
    Convert Two-Dimensional Arrays to Map
    Convert Text to Morse Code and Vice Versa
    Remember Word Frequency with Associative Memory
    Read In and Read Out Colors
    Read in Names and Manage Lengths
    Find Missing Characters
    Calculate the Number of Paths to the Three-Headed Monkey
    Manage Holidays in a Sorted Associative Store
    Quiz: Keys in a HashMap
    Determine Commonality: Party Set and Souvenir
    Develop Convenient Properties Decorator
    Program RPN Pocket Calculator
    Forget No Ship
    Find Duplicate Entries and Solve the Animal Chaos
    Loading Ship
    Handle Important Messages First
    If Used Up, Create a New One
    Notes
    6 Java Stream-API
    Regular Streams with Their Terminal and Intermediate Operations
    Hero Epic: Meet Stream API
    Quiz: Double Output
    Get the Beloved Captain from a List
    Frame Pictures
    Look and Say
    Remove Duplicate Islands of Rare Earth Metals
    Where Are the Sails?
    Buy the Most Popular Car
    Primitive Streams
    Detect NaN in an Array
    Generate Decades
    Generate Array with Constant Content via Stream
    Draw Pyramids
    Teddies Labeled with Letters
    Get the Letter Frequency of a String
    From 1 to 0, from 10 to 9
    The Annual Octopus Contest
    Merge Three int Arrays
    Determine Winning Combinations
    Statistics
    The Fastest and Slowest Paddlers
    Calculate Median
    Calculate Temperature Statistics and Draw Charts
    Suggested Solutions
    Hero Epic: Meet Stream API
    Quiz: Double Output
    Get the Beloved Captain from a List
    Frame Pictures
    Look and Say
    Remove Duplicate Islands of Rare Earth Metals
    Where Are the Sails?
    Buy the Most Popular Car
    Detect NaN in an Array
    Generate Decades
    Generate Array with Constant Content via Stream
    Teddies Labeled with Letters
    Draw Pyramids
    Get the Letter Frequency of a String
    From 1 to 0, from 10 to 9
    The Annual Octopus Contest
    Merge Three int Arrays
    Determine Winning Combinations
    The Fastest and Slowest Paddlers
    Calculate Median
    Calculate Temperature Statistics and Draw Charts
    Note
    7 Files, Directories, and File Access
    Path and Files
    Display Saying of the Day
    Merge Hiding Places
    Create Copies of a File
    Generate a Directory Listing
    Search for Large GIF Files
    Descend Directories Recursively and Find Empty Text Files
    Develop Your Own Utility Library for File Filters
    Random Access to File Contents
    Output Last Line of a Text File
    Suggested Solutions
    Display Saying of the Day
    Merge Hiding Places
    Create Copies of a File
    Generate a Directory Listing
    Search for Large GIF Files
    Descend Directories Recursively and Find Empty Text Files
    Develop Your Own Utility Library for File Filters
    Output Last Line of a Text File
    8 Input/Output Streams
    Direct Data Streams
    Get the Number of Different Places (Read Files)
    Convert Python Program to Java (Write File)
    Generate Target Code (Write File)
    Convert File Contents to Lowercase (Read and Write File)
    Convert PPM Graphics to ASCII Grayscale
    Split Files (Read and Write Files)
    Nesting Streams
    Quiz: DataInputStream and DataOutputStream
    Compress Number Sequences with the GZIPOutputStream
    Serialization
    (De)serialize Data for Chat and Convert It to Text
    Quiz: Requirement for Serialization
    Save Last Inputs
    Suggested Solutions
    Get the Number of Different Places (Read Files)
    Convert Python Program to Java (Write File)
    Generate Target Code (Write File)
    Convert File Contents to Lowercase (Read and Write File)
    Convert PPM Graphics to ASCII Gray Scale
    Split Files (Read and Write Files)
    Quiz: DataInputStream and DataOutputStream
    Compress Number Sequences with the GZIPOutputStream
    (De)serialize Data for Chat and Convert Them to Text
    Quiz: Requirement for Serialization
    Save Last Inputs
    Note
    9 Network Programming
    URL and URLConnection
    Download Remote Images via URL
    Read Remote Text File from URL
    HTTP Client
    Top News from Hacker News
    Socket and ServerSocket
    Implement a Swear Server and a Client
    Implement a Port Scanner
    Suggested Solutions
    Download Remote Images via URL
    Read Remote Text File from URL
    Top News from Hacker News
    Implement a Swear Server and a Client
    Implement a Port Scanner
    10 Process XML, JSON, and Other Data Formats
    XML Processing with Java
    Write XML File with Recipe
    Check If All Images Have an alt Attribute
    Writing Java Objects with JAXB
    Read in Jokes and Laugh Heartily
    JSON
    Hacker News JSON Exploit
    Read and Write Editor Configurations as JSON
    HTML
    Load Wikipedia Images with jsoup
    Office Documents
    Generate Word Files with Screenshots
    Archives
    Play Insect Sounds from ZIP Archive
    Suggested Solutions
    Write XML File with Recipe
    Check If All Images Have an alt Attribute
    Writing Java Objects with JAXB
    Read in Jokes and Laugh Heartily
    Hacker News JSON Exploit
    Read and Write Editor Configurations as JSON
    Load Wikipedia Images with jsoup
    Generate Word Files with Screenshots
    Play Insect Sounds from ZIP Archive
    Note
    11 Database Access with JDBC
    Database Management Systems
    Prepare H2 Database
    Database Queries
    Query All Registered JDBC Drivers
    Build Database and Execute SQL Script
    Insert Data into the Database
    Insert Data into the Database in Batch Mode
    Insert Data with Prepared Statements
    Request Data
    Interactive Scrolling through the ResultSet
    Pirate Repository
    Query Column Metadata
    Suggested Solutions
    Query All Registered JDBC Drivers
    Build Database and Execute SQL Script
    Insert Data into the Database
    Insert Data into the Database in Batch Mode
    Insert Data with Prepared Statements
    Request Data
    Interactive Scrolling through the ResultSet
    Pirate Repository
    Query Column Metadata
    12 Operating System Access
    Console
    Colored Console Outputs
    Properties
    Windows, Unix, or macOS?
    Unify Command-Line Properties and Properties from Files
    Execute External Processes
    Read the Battery Status via Windows Management Instrumentation
    Suggested Solutions
    Colored Console Outputs
    Windows, Unix, or macOS?
    Unify Command-Line Properties and Properties from Files
    Read the Battery Status via Windows Management Instrumentation
    13 Reflection, Annotations, and JavaBeans
    Reflection API
    Create UML Class Diagram with Inheritance Relationships
    Create UML Class Diagram with Properties
    Generate CSV Files from List Entries
    Annotations
    Create CSV Documents from Annotated Instance Variables
    Suggested Solutions
    Create UML Class Diagram with Inheritance Relationships
    Create UML Class Diagram with Properties
    Generate CSV Files from List Entries
    Create CSV Documents from Annotated Instance Variables
    Epilogue
    Code Golf Stack Exchange
    Project Euler
    Daily Programmer
    Rosetta Code

    ✦ Subjects


    Computer Science; Computer Programming; Java Programming Language; Imperative Programming; Object-Oriented Programming; Functional Programming; Java Programming Exercises; Java Standard Library


    📜 SIMILAR VOLUMES


    Java Programming Exercises: Volume Two:
    ✍ Christian Ullenboom 📂 Library 📅 2024 🏛 Chapman and Hall/CRC 🌐 English

    <p><span>Take the next step in raising your coding skills and dive into the intricacies of Java Standard Libraries. You will continue to raise your coding skills, and test your Java knowledge on tricky programming tasks, with the help of the pirate </span><span>Captain CiaoCiao</span><span>. This is

    Java Programming Exercises: Volume Two:
    ✍ Christian Ullenboom 📂 Library 📅 2024 🏛 Chapman and Hall/CRC 🌐 English

    <p><span>Take the next step in raising your coding skills and dive into the intricacies of Java Standard Libraries. You will continue to raise your coding skills, and test your Java knowledge on tricky programming tasks, with the help of the pirate </span><span>Captain CiaoCiao</span><span>. This is

    Java Programming Exercises: Volume One:
    ✍ Christian Ullenboom 📂 Library 📅 2024 🏛 Chapman and Hall/CRC 🌐 English

    <p><span>Take the first step in raising your coding skills to the next level, and test your Java knowledge on tricky programming tasks, with the help of the pirate </span><span>Captain CiaoCiao</span><span>. This is the first of two volumes which provide you with everything you need to excel in your

    Java Programming Exercises: Volume One:
    ✍ Christian Ullenboom 📂 Library 📅 2024 🏛 Chapman and Hall/CRC 🌐 English

    <p><span>Take the first step in raising your coding skills to the next level, and test your Java knowledge on tricky programming tasks, with the help of the pirate </span><span>Captain CiaoCiao</span><span>. This is the first of two volumes which provide you with everything you need to excel in your

    Java Programming Exercises: Volume One:
    ✍ Christian Ullenboom 📂 Library 📅 2024 🏛 Chapman and Hall/CRC 🌐 English

    <p><span>Take the first step in raising your coding skills to the next level, and test your Java knowledge on tricky programming tasks, with the help of the pirate </span><span>Captain CiaoCiao</span><span>. This is the first of two volumes which provide you with everything you need to excel in your