0% found this document useful (0 votes)
23 views

[Ebooks PDF] download Java Programming Exercises Volume One Language Fundamentals and Core Concepts 1st Edition Christian Ullenboom full chapters

The document is a promotional material for various Java programming eBooks, including 'Java Programming Exercises Volume One' by Christian Ullenboom, which offers around 200 programming tasks with solutions to enhance coding skills. It covers fundamental concepts and best practices in Java, suitable for different programming paradigms. Additional resources and eBooks on related topics are also available for instant download.

Uploaded by

raddeenzilyp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

[Ebooks PDF] download Java Programming Exercises Volume One Language Fundamentals and Core Concepts 1st Edition Christian Ullenboom full chapters

The document is a promotional material for various Java programming eBooks, including 'Java Programming Exercises Volume One' by Christian Ullenboom, which offers around 200 programming tasks with solutions to enhance coding skills. It covers fundamental concepts and best practices in Java, suitable for different programming paradigms. Additional resources and eBooks on related topics are also available for instant download.

Uploaded by

raddeenzilyp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Download the Full Version of the Ebook with Added Features ebookname.

com

Java Programming Exercises Volume One Language


Fundamentals and Core Concepts 1st Edition
Christian Ullenboom

https://ebookname.com/product/java-programming-exercises-
volume-one-language-fundamentals-and-core-concepts-1st-
edition-christian-ullenboom/

OR CLICK HERE

DOWLOAD NOW

Download more ebook instantly today at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Programming Language Design Concepts 1st Edition Findlay

https://ebookname.com/product/programming-language-design-
concepts-1st-edition-findlay/

ebookname.com

Effective Java Programming Language Guide 1st Edition


Joshua Bloch

https://ebookname.com/product/effective-java-programming-language-
guide-1st-edition-joshua-bloch/

ebookname.com

Java programming comprehensive concepts and techniques 3rd


Edition Gary B. Shelly

https://ebookname.com/product/java-programming-comprehensive-concepts-
and-techniques-3rd-edition-gary-b-shelly/

ebookname.com

Blood Noir Anita Blake Vampire Hunter 16 1st Edition


Laurell K. Hamilton

https://ebookname.com/product/blood-noir-anita-blake-vampire-
hunter-16-1st-edition-laurell-k-hamilton/

ebookname.com
Surgical Anatomy and Techniques to the Spine 2nd Edition
Daniel H. Kim Et Al.

https://ebookname.com/product/surgical-anatomy-and-techniques-to-the-
spine-2nd-edition-daniel-h-kim-et-al/

ebookname.com

Multicultural Psychology 6th Edition Jeffery Scott Mio

https://ebookname.com/product/multicultural-psychology-6th-edition-
jeffery-scott-mio/

ebookname.com

Electrical insulation for rotating machines 1st Edition


Greg Stone

https://ebookname.com/product/electrical-insulation-for-rotating-
machines-1st-edition-greg-stone/

ebookname.com

Pauline Frommer s Washington D C Pauline Frommer Guides


1st Edition James T. Yenckel

https://ebookname.com/product/pauline-frommer-s-washington-d-c-
pauline-frommer-guides-1st-edition-james-t-yenckel/

ebookname.com

Organizational Behaviour 1st Edition Daniel King

https://ebookname.com/product/organizational-behaviour-1st-edition-
daniel-king/

ebookname.com
The Heroic Slave A Cultural and Critical Edition Frederick
Douglass (Editor)

https://ebookname.com/product/the-heroic-slave-a-cultural-and-
critical-edition-frederick-douglass-editor/

ebookname.com
Java Programming Exercises
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 Captain CiaoCiao. This is the first 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:

• About 200 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.
Java Programming Exercises
Volume One: Language Fundamentals and
Core Concepts

Christian Ullenboom
Designed cover image: Mai Loan Nguyen Duy, Rheinwerk Verlag GmbH

First edition published 2025


by CRC Press
2385 NW Executive Center Drive, Suite 320, Boca Raton FL 33431

and by CRC Press


4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN

CRC Press is an imprint of Taylor & Francis Group, LLC

©2023 Christian Ullenboom. First published in the German language under the title “Captain CiaoCiao erobert Java”
(ISBN 978‑3‑8362‑8427‑1) by Rheinwerk Verlag GmbH, Bonn, Germany.

Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to
copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been
acknowledged please write and let us know so we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or
utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including
photocopying, microfilming, and recording, or in any information storage or retrieval system, without written
permission from the publishers.

For permission to photocopy or use material electronically from this work, access www.copyright.com or contact the
Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978‑750‑8400. For works that are
not available on CCC please contact mpkbookspermissions@tandf.co.uk

Trademark notice: Product or corporate names may be trademarks or registered trademarks and are used only for
identification and explanation without intent to infringe.

ISBN: 978‑1‑032‑59397‑5 (hbk)


ISBN: 978‑1‑032‑57984‑9 (pbk)
ISBN: 978‑1‑003‑45450‑2 (ebk)

DOI: 10.1201/9781003454502

Typeset in Times
by codeMantra

Access the Support Material: https://routledge.com/9781032579849


Contents

About the Author xv

Introduction 1
Previous Knowledge and Target Audience 1
Working with This Book 2
The Suggested Solutions 2
Use of This Book 3
Required Software 3
Used Java Version in the Book 4
JVM 4
Development Environment 4
Conventions 4
Helping Captain CiaoCiao and Bonny Brain 5

1 Introduction to the Java Ecosystem 6


Bytecode and JVM 6
Porting Java Programs ⭑ 6
Tools for Java Developers 7
Get to Know Error Messages of the IDE ⭑ 7
Suggested Solutions 8
Porting Java Programs ⭑ 8
Get to Know Error Messages of the IDE ⭑ 8

2 Imperative Programming 9
Screen Output 9
Learn about the SVG Specification 9
Write an SVG Circle on the Console ⭑ 10
Variables and Data Types 11
Access Variables and Output Their Assignments ⭑ 12
Quiz: Value Ranges ⭑ 12
Quiz: Does This Add Up? ⭑⭑⭑ 12
Generate Random Circles ⭑ 13
Quiz: Dazed and Confused ⭑ 14
Process User Input ⭑ 14
Expressions, Operands, and Operators 14
Quiz: Check In-Between ⭑ 14
Check If Loot Can Be Shared Fairly ⭑ 15
Do Two Numbers Share the Same Digit? ⭑⭑ 15
Convert Currency Amount to Coins ⭑⭑ 15
One Bottle of Rum, Ten Bottles of Rum ⭑ 16
Quiz: The Zero Effect ⭑ 17

v
vi Contents

Control Flow 18
Payday ⭑ 18
Quiz: Wrong Branching ⭑ 18
Convert Liters ⭑⭑ 19
Create SVG Circles with Random Colors ⭑ 19
Quiz: To Which Block Does the Else Belong? ⭑⭑ 20
Quiz: Recognize Negative Days and Hours ⭑ 20
Evaluate Input Strings for Approval ⭑ 20
Rewrite Switch Statement to Switch Expression ⭑ 21
Loops 21
Create Rotated SVG Rectangles ⭑ 21
Create SVG‑Pearl‑Chain ⭑ 22
Sum Numbers from the Command Line ⭑ 23
Go through a Mathematical Phenomenon ⭑ 24
Quiz: How Many Stars? ⭑ 24
Calculate Products for Faculties ⭑ 25
Determine If a Number Is Formed by Factorial ⭑ 25
Find the Smallest and Largest Digit of a Number ⭑ 26
Quiz: Not Like This from 1 to 100 ⭑⭑ 27
A Flag in the Wind through Nested Loops ⭑ 28
Output Simple Chessboard ⭑ 28
It’s Christmastime: Displaying Trees with Ornaments ⭑ 29
Draw Fishy Stitching Motifs ⭑ 30
Trying Instead of Thinking ⭑⭑ 31
Get the Number of Digits of a Number ⭑⭑ 32
Methods 33
Drawing Hearts ⭑ 33
Implement Overloaded Line Methods ⭑ 34
Standing Straight ⭑ 34
Create a Multiplication Table ⭑ 35
Cistercian Numerals Script ⭑⭑⭑ 36
Quiz: What Does Ding‑Dong Do? (Recursion) ⭑⭑ 37
Quiz: Repdigit (Recursion) ⭑⭑ 37
Calculate Collatz Sequence (Recursion) ⭑ 38
Ancient Egyptian Multiplication (Recursion) ⭑⭑ 38
Suggested Solutions 40
Write an SVG Circle on the Console ⭑ 40
Access Variables and Output Their Assignments 41
Quiz: Value Ranges 42
Quiz: Does This Add Up? 43
Generate Random Circles 43
Quiz: Dazed and Confused 44
Process User Input 44
Quiz: Check In-Between 44
Check If Loot Can Be Shared Fairly 45
Do Two Numbers Share the Same Digit? 45
Convert Currency Amount to Coins 46
One Bottle of Rum, Ten Bottles of Rum 47
Quiz: The Zero Effect 47
Payday 47
Quiz: Wrong Branching 48
Contents vii

Convert Liters 48
Create SVG Circles with Random Colors 49
Quiz: To Which Block Does the Else Belong? 50
Quiz: Recognize Negative Days and Hours 50
Evaluate Input Strings for Approval 51
Rewrite Switch Statement to Switch Expression 52
Create Rotated SVG Rectangles 52
Create SVG‑Pearl‑Chain 53
Sum Numbers from the Command Line 53
Go through a Mathematical Phenomenon 54
Quiz: How Many Stars? 55
Calculate Products for Faculties 55
Determine If a Number Is Formed by Factorial 57
Find the Smallest and Largest Digit of a Number 58
Quiz: Not Like This from 1 to 100 58
A Flag in the Wind through Nested Loops 59
Output Simple Chessboard 60
It’s Christmastime: Displaying Trees with Ornaments 60
Draw Fishy Stitching Motifs 61
Trying Instead of Thinking 62
Get the Number of Digits of a Number 63
Drawing Hearts 65
Implement Overloaded Line Methods 65
Standing Straight 66
Create a Multiplication Table 68
Cistercian Numerals Script 69
Quiz: What Does Ding‑Dong Do? (Recursion) 72
Quiz: Repdigit (Recursion) 72
Calculate Collatz Sequence (Recursion) 73
Ancient Egyptian Multiplication (Recursion) 75

3 Classes, Objects, and Packages 78


Creating Objects 78
Draw Polygons ⭑ 78
Working with References 80
Quiz: The Short Life of Points ⭑ 80
Build Triangles ⭑ 80
Quiz: == vs. equals(…) ⭑ 81
Quiz: Protect against NullPointerException ⭑ 81
Suggested Solutions 82
Draw Polygons 82
Quiz: The Short Life of Points 83
Build Triangles 83
Quiz: == vs. equals(…) 84
Quiz: Protect against NullPointerException 84
Note 85

4 Arrays 86
Everything Has a Type 86
Quiz: Array Types ⭑ 86
One‑Dimensional Arrays 87
viii Contents

Loop Arrays and Output Wind Speed, Wind Direction ⭑ 87


Detect Continuous Revenue Growth ⭑ 88
Array of Points ⭑ 88
Search Consecutive Strings and Determine If Salty Snook Is Coming ⭑ 89
Reverse an Array ⭑ 89
Find the Nearest Cinema ⭑⭑ 90
Raid the Candy Store and Share Fairly ⭑⭑ 90
Enhanced for Loop 91
Numbers Well Shuffled ⭑⭑ 92
Draw Mountains ⭑⭑ 93
Two‑ and Multidimensional Arrays 94
Check Mini‑Sudoku for Valid Solution ⭑⭑ 94
Enlarge Image ⭑⭑ 95
Variable Argument Lists 96
Create SVG Polygons with a Variable Number of Coordinates ⭑ 96
Check for Approval ⭑ 97
Help, Tetraphobia! Put All Fours Last ⭑⭑ 97
The Utility Class Arrays 98
Quiz: Copy Arrays ⭑ 98
Quiz: Compare Arrays ⭑ 98
Suggested Solutions 99
Quiz: Array Types 99
Loop Arrays and Output Wind Speed, Wind Direction 99
Reverse an Array 100
Array of Points 101
Search Consecutive Strings and Determine if Salty Snook is Coming 102
Reverse an Array 103
Find the Nearest Cinema 104
Raid the Candy Store and Share Fairly 105
Draw Mountains 106
Check Mini‑Sudoku for Valid Solution 107
Enlarge Image 109
Create SVG Polygons with Variable Number of Coordinates 109
Check for Approval 110
Help, Tetraphobia! Put All Fours Last 111
Quiz: Copy Arrays 112
Quiz: Compare Arrays 112

5 Character and String Processing 114


The String Class and Its Members 114
Quiz: Is String a Built-In Keyword? ⭑ 114
Building HTML Elements with Simple Concatenation ⭑ 114
Check Safe Transmission by Doubling Characters ⭑ 115
Swap Y and Z ⭑ 116
Give Defiant Answers ⭑ 117
Quiz: String Comparisons with == and Equals(…) ⭑ 117
Quiz: Is Equals(…) Symmetric? ⭑ 118
Test Strings for Palindrome Property ⭑ 118
Check if Captain CiaoCiao is in the Middle ⭑ 119
Find the Shortest Name in the Array ⭑ 120
Count String Occurrences ⭑ 120
Contents ix

Determine the Larger Crew Size ⭑ 121


Build Diamonds ⭑⭑ 122
Check for a Good Password ⭑ 123
Bake Peanut Butter Cookies ⭑⭑ 123
Calculate Sum of Digits ⭑ 124
Decolumnize Texts ⭑⭑ 125
Draw a Meadow with Favorite Flowers ⭑⭑ 126
Detect Repetitions ⭑⭑⭑ 128
Constrain Line Boundaries and Wrap Lines ⭑⭑ 128
Quiz: How Many String Objects? ⭑ 129
Test If the Fruit Is Wrapped in Chocolate ⭑⭑ 129
From Top to Bottom, from Left to Right ⭑⭑⭑ 130
Dynamic Strings with StringBuilder 131
Fill Strings ⭑ 131
Practicing the Alphabet with a Parrot ⭑ 132
Quiz: Lightly Attached ⭑ 133
Convert Number to Textual Unary Encoding ⭑ 133
Lose Weight by Moving Digits ⭑ 134
Remove Vowels ⭑ 135
Don’t Shoot the Messenger ⭑ 136
Compress Repeated Spaces ⭑⭑ 137
Insert and Remove Crackles and Pops ⭑ 137
Split CamelCase Strings ⭑ 138
Underline Words ⭑⭑ 138
Implement Caesar Encryption ⭑⭑⭑ 138
Suggested Solutions 140
Quiz: Is String a Built‑In Keyword? 140
Building HTML Elements with Simple Concatenation 140
Check Safe Transmission by Doubling Characters 140
Swap Y and Z 141
Give Defiant Answers 143
Quiz: String Comparisons with == and Equals(…) 143
Quiz: Is Equals(…) Symmetric? 143
Test Strings for Palindrome Property 144
Check if Captain CiaoCiao is in the Middle 146
Find the Shortest Name in the Array 146
Count String Occurrences 147
Determine the Larger Crew Size 148
Build Diamonds 149
Check for a Good Password 151
Bake Peanut Butter Cookies 152
Calculate Sum of Digits 153
Decolumnize Texts 154
Draw a Meadow with Favorite Flowers 156
Detect Repetitions 158
Constrain Line Boundaries and Wrap Lines 159
Quiz: How Many String Objects? 160
Test if the Fruit is Wrapped in Chocolate 160
From Top to Bottom, from Left to Right 161
Fill Strings 162
Practicing the Alphabet with a Parrot 163
x Contents

Quiz: Lightly Attached 164


Convert Number to Textual Unary Encoding 165
Lose Weight by Moving Digits 166
Remove Vowels 167
Don’t Shoot the Messenger 169
Compress Repeated Spaces 170
Insert and Remove Crackles and Pops 171
Split CamelCase Strings 172
Underline Words 173
Implement Caesar Encryption 174

6 Writing Your Own Classes 176


Class Declaration and Object Properties 177
Declare Radio with Instance Variables and a Main Program ⭑ 177
Implementing Methods of a Radio ⭑ 177
Private Parts: Make Instance Variables Private ⭑ 178
Create Setters and Getters ⭑ 178
Static Variables Methods 178
Convert Station Names to Frequencies ⭑ 178
Write Log Output with a Tracer Class ⭑ 179
Quiz: Nothing Stolen ⭑ 180
Simple Enumerations 181
Give Radio an AM–FM Modulation ⭑ 181
Set Valid Start and End Frequency for Modulation ⭑ 181
Constructors 181
Writing Radio Constructors ⭑ 182
Implement Copy Constructor ⭑ 182
Realize Factory Methods ⭑ 182
Associations 183
Connect Monitor Tube with TV ⭑ 183
Quiz: Association, Composition, and Aggregation ⭑ 184
Add Radios with a 1:n Association to the Ship ⭑⭑ 184
Inheritance 185
Introduce Abstraction into Electrical Devices via Inheritance ⭑ 185
Quiz: Three, Two, and One ⭑ 185
Quiz: Private and Protected Constructor ⭑ 186
Determine the Number of Switched on Electrical Devices ⭑ 186
Ship Should Hold Any Electronic Device ⭑ 186
Take Working Radios on the Ship ⭑ 187
Solve Equivalence Test with Pattern Variable ⭑ 187
Fire Alarm Does Not Go Off: Overriding Methods ⭑ 188
Calling the Methods of the Superclass ⭑⭑ 188
Polymorphism and Dynamic Binding 189
Holiday! Switch Off All Devices ⭑ 189
The Big Move ⭑ 190
Quiz: Bumbo Is a Great Drink ⭑⭑ 191
Quiz: Vodka with Taste ⭑ 192
Quiz: Rum‑Paradise ⭑⭑ 192
Abstract Classes and Abstract Methods 192
Quiz: Consumer Devices as an Abstract Superclass? ⭑ 193
TimerTask as an Example for an Abstract Class ⭑⭑ 193
Contents xi

Suggested Solutions 194


Declare Radio with Instance Variables and a Main Program 194
Implementing Methods of a Radio 195
Private Parts: Make Instance Variables Private 196
Create Setters and Getters 197
Convert Station Names to Frequencies 198
Write Log Output with a Tracer Class 198
Quiz: Nothing Stolen 199
Give Radio an AM–FM Modulation 199
Set Valid Start and End Frequency for Modulation 200
Writing Radio Constructors 201
Implement Copy Constructor 202
Realize Factory Methods 202
Connect Monitor Tube with TV 204
Quiz: Association, Composition, and Aggregation 205
Add Radios with a 1:n Association to the Ship 205
Introduce Abstraction into Electrical Devices via Inheritance 206
Quiz: Three, Two, and One 207
Quiz: Private and Protected Constructor 208
Determine Number of Switched on Electrical Devices 208
Ship Should Hold Any Electronic Device 209
Take Working Radios on the Ship 209
Solve Equivalence Test with Pattern Variable 210
Fire Alarm Does Not Go Off: Overriding Methods 210
Calling the Methods of the Superclass 211
Holiday! Switch Off All Devices 212
The Big Move 212
Quiz: Bumbo Is a Great Drink 212
Quiz: Vodka with Taste 213
Quiz: Rum‑Paradise 213
Quiz: Consumer Devices as an Abstract Superclass? 214
TimerTask as an Example for an Abstract Class 214
Note 215

7 Records, Interfaces, Enumerations, and Sealed Classes 216


Records 216
Quiz: Which Statements Are True for Records? ⭑ 216
Develop Record for Complex Numbers ⭑ 216
Quiz: Records with Static Variables ⭑ 217
Record Patterns ⭑ 217
Interfaces 218
Compare Consumption of Electrical Devices ⭑ 218
Find Electronic Devices with the Highest Power Consumption ⭑ 219
Use Comparator Interface for Sorting ⭑ 220
Static and Default Methods in Interfaces ⭑⭑⭑ 220
Delete Selected Elements with Predicate ⭑⭑ 220
Enumeration Types (enum) 221
Enumeration for Candy ⭑ 221
Deliver Random Candies ⭑ 222
Tagging Candy with Addictive Value ⭑⭑ 223
Interface Implementations via an enum ⭑⭑ 224
xii Contents

Quiz: Aviso and Brig ⭑ 225


Suggested Solutions 225
Quiz: Which Statements Are True for Records? 225
Quiz: Records with Static Variables 226
Quiz: Records with Static Variables 227
Compare Consumption of Electrical Devices 228
Find Electronic Devices with the Highest Power Consumption 229
Use Comparator Interface for Sorting 230
Static and Default Methods in Interfaces 230
Delete Selected Elements with Predicate 231
Enumeration for Candy 232
Deliver Random Candies 233
Tagging Candy with Addictive Value 233
Interface Implementations via an enum 236
Quiz: Aviso and Brig 237

8 Nested Types 238


Declare Nested Types 238
Set AM–FM Modulation to Radio Type ⭑ 238
Write Three Kinds of Watt‑Comparator Implementations ⭑ 239
Nested Types Quiz 239
Quiz: Pirate Could Have Waved ⭑ 239
Quiz: Name in a Bottle ⭑⭑ 240
Quiz: Get Me Another Bottle of Rum ⭑ 240
Suggested Solutions 241
Set AM–FM Modulation to Radio Type 241
Write Three Kinds of Watt‑Comparator Implementations 242
Quiz: Pirate Could Have Waved 243
Quiz: Name in a Bottle 243
Quiz: Get Me another Bottle of Rum 243

9 Exception Handling 244


Catching Exceptions 244
Get the Longest Line of a File ⭑ 244
Identify Exceptions, Laughing All the Time ⭑ 245
Convert String Array to Int Array and Be Lenient on Nonnumbers ⭑ 245
Quiz: And Finally ⭑ 246
Quiz: A Lonely Try ⭑ 246
Quiz: Well Caught ⭑ 246
Quiz: Too Much of a Good Thing ⭑ 247
Quiz: Try‑Catch in Inheritance ⭑⭑ 247
Throwing Custom Exceptions 247
Quiz: Throw and Throws ⭑ 247
Quiz: The Division Fails ⭑ 248
Writing Your Own Exception Classes 248
Show Impossible Watt with Own Exception ⭑ 248
Quiz: Potatoes or Other Vegetables ⭑ 248
Try‑with‑Resources 249
Write Current Date to File ⭑ 249
Read Notes and Write Them to a New ABC File ⭑⭑ 249
Contents xiii

Quiz: Excluded ⭑ 250


Suggested Solutions 251
Get the Longest Line of a File 251
Identify Exceptions, Laughing All the Time 252
Convert String Array to Int Array and Be Lenient on Nonnumbers 254
Quiz: And Finally 255
Quiz: A Lonely Try 255
Quiz: Well Caught 256
Quiz: Too Much of a Good Thing 256
Quiz: Try‑Catch in Inheritance 257
Quiz: Throw and Throws 257
Quiz: The Division Fails 257
Show Impossible Watt with Own Exception 258
Quiz: Potatoes or Other Vegetables 260
Write Current Date to File 260
Read Notes and Write Them to a New ABC File 261
Quiz: Excluded 262

10 Lambda Expressions and Functional Programming 263


Lambda Expressions 264
Quiz: Recognize Valid Functional Interfaces ⭑ 264
Quiz: From Interface Implementation to Lambda Expression ⭑ 264
Write Lambda Expressions for Functional Interfaces ⭑ 265
Quiz: Write Lambda Expressions Like This? ⭑ 266
Developing Lambda Expressions ⭑ 266
Quiz: Contents of the Package java.util.function ⭑ 266
Quiz: Know Functional Interfaces for Mappings ⭑ 266
Method and Constructor References 268
Rewriting Lambda Expressions ⭑⭑ 268
Selected Functional Interfaces 268
Delete Entries, Remove Comments, Convert to CSV ⭑ 268
Suggested Solutions 269
Quiz: Recognize Valid Functional Interfaces 269
Quiz: From Interface Implementation to Lambda Expression 270
Write Lambda Expressions for Functional Interfaces 271
Quiz: Write Lambda Expressions Like This? 271
Developing Lambda Expressions 271
Quiz: Contents of the Package java.util.function 271
Quiz: Know Functional Interfaces for Mappings 272
Rewriting Lambda Expressions 273
Delete Entries, Remove Comments, and Convert to CSV 273
Note 274

11 Special Types from the Java Class Library 275


Absolute Superclass java.lang.Object 275
Generate equals(Object) and hashCode() ⭑ 276
Existing equals(Object) Implementations ⭑⭑ 276
Interfaces Comparator and Comparable 277
Quiz: Natural Order Or Not? ⭑ 277
Handle Superheroes 277
xiv Contents

Compare Superheroes ⭑⭑ 279


Concatenate Hero Comparators ⭑ 280
Using a Key Extractor to Easily Create a Comparator ⭑⭑ 280
Sort Points by Distance to Center ⭑ 282
Find Stores Nearby ⭑⭑ 283
Autoboxing 283
Quiz: Handling Null Reference in Unboxing ⭑ 283
Quiz: Unboxing Surprise ⭑⭑ 284
Suggested Solutions 284
Generate equals(Object) and hashCode() 284
Existing equals(Object) Implementations 287
Quiz: Natural Order Or Not? 289
Compare Superheroes 289
Concatenate Hero Comparators 290
Using a Key Extractor to Easily Create a Comparator 291
Sort Points by Distance to Center 291
Find Stores Nearby 292
Quiz: Handling Null Reference in Unboxing 293
Quiz: Unboxing Surprise 294
Notes 294

Appendix A: Most Frequent Types and Methods in the Java Universe 295
A.1 Packages with the Most Common Types 295
A.2 100 Most Common Types 296
A.3 100 Most Common Methods 299
A.4 100 Most Common Methods Including Parameter List 302
Exploring the Variety of Random
Documents with Different Content
'Yes, by Jove! but in the time to come?'

'Thanks again, I say, dear Hammersley, but I am inclined to let to-


morrow take care of to-morrow, especially while campaigning in Zululand.'

'Tiresome work I find that, with all my zeal for the service,' observed
Hammersley, as the entire cavalry force moved off about four in the
morning, when the sky and landscape were alike dark. 'We have much
bodily endurance, and run enormous risks which the people at home don't
understand or fully appreciate, because our antagonists are naked savages,
though second to no men in the world for reckless valour; thus honour may
be accorded to us but scantily and grudgingly, because they are savages and
not civilised enemies, or, as some one says of the days of the Great Duke,
when so many thousand men in red coats and blue breeches met and beat so
many thousand men in blue coats and red breeches.'

General Marshall, with the King's Dragoon Guards and 17th Lancers,
had reconnoitred the country in advance as far as the Upoko River, and
there effected a junction with Buller's command on the same ground where
the latter had escaped the ambuscade referred to.

On a green plain below it a great mass of Zulus, sombre and dark,


spotted with the grey of their oval shields, was seen hovering, the flash of
an assegai-head sparkling out at times when the sun arose, and near them,
enveloped in smoke and all sheeted with flame at once, were some kraals
that had been set on fire by the Irregular Horse; so the scene, if beautiful,
was also a stirring one.

Above the vast mountain opposite, where the Upoko (a tributary of the
great White Umvulosi, which flows towards the sea) was rolling in golden
sheen between banks clothed with date palms, Kaffir plums, flowering
acacias, and thornwood, the uprisen sun was shining in all his glory. The
mountain was torn by ravines and studded with mimosa groups. On the left
of the troops rose the vast Inhlatzatye, or mountain of greenstone, turned to
crimson in the morning sun, its base clothed with lovely pasture, and twenty
miles in its rear was known to be Ulundi, the great military kraal of
Cetewayo, the chief object of the advance.
In the immediate foreground was the force of cavalry, with all their
white helmets and sword blades shining in the sun, the dark blue of the
Lancers, and the sombre uniforms of the Irregular Horse, relieved and
varied by the bright scarlet of the King's Dragoon Guards and the mimosa-
coloured tunics of the Mounted Infantry.

The sharp blare of the trumpets sounded 'the advance.'

'Buller's Horse to the left!' cried the officer of that name, digging spurs
into his charger; 'Whalley's to the right! Frontier Light Horse and
Hammersley's Mounted Infantry the centre!'

Uncovering to the flanks, the formation was made at a canter, and the
forward movement began. During the morning Florian had more than once
(till his men required his attention) an unpleasant sense of the presence of
two secret enemies on the ground, which made him look frequently to
where the oddly costumed volunteer troopers were advancing, and before
that day's fighting was quite over he had bitter cause to know that both were
in the field.

The 1st King's Dragoon Guards had been quartered in the same barracks
with the regiment to which these two deserters belonged, and, feeling
themselves now in hourly expectation of recognition by some of them, the
camp of the Second Division had become perilous for the two desperadoes,
and on that day they had resolved to 'levant,' but not before effecting their
villainous purpose, if possible.

They knew well that by the rules of the service, at foreign stations, when
there is no doubt as to the identity of a deserter, he is sent at once to his own
corps to be dealt with there; moreover, they know that the fact of their
serving with the Volunteer Horse constituted another crime—that of
fraudulent enlistment; and neither had any desire to be tied to the wheel of a
field-piece and flogged as an example to others, for that punishment had not
been quite abandoned yet.

While Colonel Buller's force was advancing, the Zulus had moved off by
companies in singularly regular formation, and taken post in the rocky
ravines at the base of the Euzangonyan Hill, which was covered with thick
scrub and high feathery reeds, that swayed to and fro in the wind like a
mighty cornfield.

After crossing the river, the Irregulars and Mounted Infantry at full speed
advanced to within three hundred yards of the foe, and leaped from their
saddles, with rifles unslung. The horses were then led forward out of fire, or
nearly so, by every third file, told off for that purpose.

Kneeling and creeping forward by turns, the fighting line opened a


steady fire upon the partly concealed Zulus, whose dark figures were half
seen, half hidden amid the smoke that eddied along the slopes of the hill,
and this continued till the watchful Buller, who was surveying the position
through a field-glass from the summit of a knoll, discovered from a flank
movement that the Zulus had a large force in reserve, and, in a wily manner,
were luring his troops on to destruction.

He ordered his bugle to sound the 'retire' and the whole to recross the
river, but not before several men were killed or wounded, with fifteen
horses placed hors de combat; then the Queen's cavalry were ordered to
advance to the attack with lance and sword.

In his saddle, Florian watched them advance in imposing order, led by


that preux chevalier, Drury Lowe, the hero of Zurapore, where the pursuit
and the destruction of Tantia Topee were achieved in the Indian war. When
Buller's scouting horse, skilled marksmen even from the saddle, and
mounted on cattle nimble as antelopes, had partly failed, he could scarcely
hope to achieve much with his heavy Lancers and still heavier Dragoon
Guardsmen; but sending a troop of the latter to guard against any chance of
the Zulus creeping down the bed of the river, he led three troops of Lancers
close to the margin, where the marigold figs grew in profusion, and the
yellow Kaffir melons, large as 40-pound shot, were floating in the current;
and splashing through, he deployed them on some open ground beyond, full
of that fiery confidence that there is nothing in war which the genuine
dragoon cannot achieve.

'By Jove!' exclaimed Hammersley, 'but it is sad to see these splendid


Lancers going in for this kind of work. It is hopeless for them to charge
such a position, and attempt, at the lance's point, to ferret these savages out
of their holes and dongas.'

From the Euzangonyan Hill the Zulus were now firing heavily, but as
their rifles were all wrongly sighted—if sighted at all—their bullets went
high into the air. Between these and Lowe spread a mealie-field, which he
believed to be full of other Zulus, and resolved to let all who might be
lurking there feel what the point of a lance is, he rode straight at it.

'Trot—gallop—charge!' sounded the trumpets; and with their horses'


manes and the banneroles of their levelled lances streaming backward on
the wind, the 17th rushed on, sweeping through the tall, brown stalks of the
dead mealies, but found no Zulus there.

When clear of the mealies, Lowe ordered some of the Lancers to


dismount and open fire with their carbines on those Zulus who were lurking
on the hill-slope among some thorn-trees, and there many were shot down,
and their half-devoured and festering remains were found by our soldiers in
the subsequent August.

After punishing them severely, the cavalry were recalled, but not before
there were some casualties among the Lancers, whose adjutant, Lieutenant
Frith—a favourite officer—was shot through the heart, and brought to camp
dead across the saddle of his charger.

From fastnesses that were quite inaccessible to horsemen, the Zulus,


covered by an undergrowth of prickly thorns and plants with enormous
brown spiky leaves, continued to fire heavily, wreathing all the hill-side in
white smoke, streaked with jets of fire; while another portion of them,
yelling and running with the swiftness of hares, lined the bed of the river
and opened a sputtering fusilade in flank, rendering the whole position of
our cavalry most perilous.

'Retire by alternate squadrons!' was now the order for the cavalry, and
beautifully and steadily was the movement executed.

'Fours about—trot,' came the order in succession from the leaders of the
even and odd squadrons.
A front was thus kept to the Zulus, but the hope to lure them from their
fastnesses by a movement they had never seen before, and to have a chance
of attacking them in the open, proved vain; and upon broken and steep
ground, on which it would have been impossible for any cavalry force to
assail them, they were seen swarming in vast black hordes round the flanks
of the Euzangonyan Hill, and still maintaining a sputtering but distant
though defiant fire, while the cavalry and other mounted men fell back
towards their respective columns; and now it was that the calamitous
outrage we have hinted at occurred.

When the cavalry began to fall back by alternate squadrons, it was


remarked that two men of the Irregular Horse lingered at a considerable
distance in the rear, still firing occasionally, as if they had not heard the
sound of the trumpet to 'retire.'

'Those rash fools will get knocked on the head if they don't come back,'
said Hammersley to Florian, as they were riding leisurely now at a little
distance in rear of their men. 'They are nearly six hundred yards off. Well,
we have not got even a scratch to-day,' he added, laughing, as he
manipulated and proceeded to light a cigar; 'and now to get back to camp
and have a deep drink of bitter beer. By Jove, I am thirsty as a bag of sand.'

'And I too,' said Florian.

Again the 'retire' was sounded, now by two trumpeters together, but
without avail apparently.

At that moment two rifle-shots came upon the speakers, delivered by the
very men in question, and then they were seen to gallop at full speed, not
after the retreating column, but at an angle towards the north-west, on
perceiving that their shots had taken fatal effect; for Hammersley, struck by
one, fell from his saddle on his face, and rolled over apparently in mortal
agony, while Florian felt Tattoo give a kind of writhing bound under him
and nearly topple over on his forehead till recovered by the use of spur and
bridle-bit. Florian at once dismounted, for the horse was seriously
wounded; but he could only give a despairing glance at his friend, if he
meant to act decisively and avenge him.
'These scoundrels are deserters doubly—I know; follow me, men, we
have not a moment to lose!' cried Florian, in a voice husky with rage, grief,
and excitement, as he leaped upon poor Hammersley's horse; and with a
section of four men, one of whom was Tom Tyrrell, he spurred after them at
full speed, without waiting for orders given or permission accorded.

If he was to act at all, there was no time for either.

He never doubted for a moment that they were Josh Jarrett and Dick of
the Droogveldt, who were boldly attempting to escape in the face of the
column after failing to shoot himself, and who had now fully thousand
yards start of him and his pursuing party.

END OF VOL. II.

BILLING & SONS, PRINTERS, GUILDFORD.


*** END OF THE PROJECT GUTENBERG EBOOK DULCIE
CARLYON: A NOVEL. VOLUME 2 (OF 3) ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying copyright
royalties. Special rules, set forth in the General Terms of Use part of
this license, apply to copying and distributing Project Gutenberg™
electronic works to protect the PROJECT GUTENBERG™ concept
and trademark. Project Gutenberg is a registered trademark, and
may not be used if you charge for an eBook, except by following the
terms of the trademark license, including paying royalties for use of
the Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is very
easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund from
the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law in
the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms of
this agreement by keeping this work in the same format with its
attached full Project Gutenberg™ License when you share it without
charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the terms
of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears, or
with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning of
this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1 with
active links or immediate access to the full terms of the Project
Gutenberg™ License.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or expense
to the user, provide a copy, a means of exporting a copy, or a means
of obtaining a copy upon request, of the work in its original “Plain
Vanilla ASCII” or other form. Any alternate format must include the
full Project Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt that
s/he does not agree to the terms of the full Project Gutenberg™
License. You must require such a user to return or destroy all
copies of the works possessed in a physical medium and
discontinue all use of and all access to other copies of Project
Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in paragraph
1.F.3, the Project Gutenberg Literary Archive Foundation, the owner
of the Project Gutenberg™ trademark, and any other party
distributing a Project Gutenberg™ electronic work under this
agreement, disclaim all liability to you for damages, costs and
expenses, including legal fees. YOU AGREE THAT YOU HAVE NO
REMEDIES FOR NEGLIGENCE, STRICT LIABILITY, BREACH OF
WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE
PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE THAT THE
FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving it,
you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or entity
that provided you with the defective work may elect to provide a
replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth in
paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.
1.F.6. INDEMNITY - You agree to indemnify and hold the
Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and distribution
of Project Gutenberg™ electronic works, harmless from all liability,
costs and expenses, including legal fees, that arise directly or
indirectly from any of the following which you do or cause to occur:
(a) distribution of this or any Project Gutenberg™ work, (b)
alteration, modification, or additions or deletions to any Project
Gutenberg™ work, and (c) any Defect you cause.

Section 2. Information about the Mission of


Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many small
donations ($1 to $5,000) are particularly important to maintaining tax
exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About Project


Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.

Project Gutenberg™ eBooks are often created from several printed


editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like