Head First Java 2nd Edition Kathy Sierra pdf download
Head First Java 2nd Edition Kathy Sierra pdf download
download
https://ebookfinal.com/download/head-first-java-2nd-edition-
kathy-sierra/
https://ebookfinal.com/download/badass-making-users-awesome-1st-
edition-kathy-sierra/
https://ebookfinal.com/download/oca-ocp-java-se-7-programmer-i-ii-
study-guide-exams-1z0-803-1z0-804-1st-edition-kathy-sierra/
https://ebookfinal.com/download/head-first-algebra-tracey-pilone/
https://ebookfinal.com/download/head-first-python-a-brain-friendly-
guide-2nd-edition-paul-barry/
Head First Physics 1st Edition Heather Lang
https://ebookfinal.com/download/head-first-physics-1st-edition-
heather-lang/
https://ebookfinal.com/download/head-first-c-third-edition-jennifer-
greene/
https://ebookfinal.com/download/head-first-python-1st-edition-paul-
barry/
https://ebookfinal.com/download/head-first-design-patterns-1st-
edition-eric-freeman/
https://ebookfinal.com/download/head-first-android-development-1st-
edition-dawn-griffiths/
Head First Java 2nd Edition Kathy Sierra Digital Instant
Download
Author(s): Kathy Sierra, Bert Bates
ISBN(s): 9780596009205, 0596009208
Edition: 2
File Details: PDF, 33.97 MB
Year: 2005
Language: english
:PVS#SBJOPO+BWB"-FBSOFST(VJEF
ND %DITION #OVERS *AVA
-FBSOIPXUISFBET
DBODIBOHFZPVSMJGF )FBE'JSTU
+BWB .BLF+BWBDPODFQUT
TUJDLUPZPVSCSBJO
'PPMBSPVOEJO
UIF+BWB-JCSBSZ
"WPJEFNCBSBTTJOH
00NJTUBLFT
#FOEZPVSNJOE
BSPVOE
+BWBQV[[MFT
.BLFBUUSBDUJWF
BOEVTFGVM(6*T
,BUIZ4JFSSB#FSU#BUFT
Table of Contents (summary)
Intro xxi
1 Breaking the Surface: a quick dip 1
2 A Trip to Objectville: yes, there will be objects 27
3 Know Your Variables: primitives and references 49
4 How Objects Behave: object state affects method behavior 71
5 Extra-Strength Methods: flow control, operations, and more 95
6 Using the Java Library: so you don’t have to write it all yourself 125
7 Better Living in Objectville: planning for the future 165
8 Serious Polymorphism: exploiting abstract classes and interfaces 197
9 Life and Death of an Object: constructors and memory management 235
10 Numbers Matter: math, formatting, wrappers, and statics 273
11 Risky Behavior: exception handling 315
12 A Very Graphic Story: intro to GUI, event handling, and inner classes 353
13 Work on Your Swing: layout managers and components 399
14 Saving Objects: serialization and I/O 429
15 Make a Connection: networking sockets and multithreading 471
16 Data Structures: collections and generics 529
17 Release Your Code: packaging and deployment 581
18 Distributed Computing: RMI with a dash of servlets, EJB, and Jini 607
A Appendix A: Final code kitchen 649
B Appendix B: Top Ten Things that didn’t make it into the rest of the book 659
Index 677
i Intro
Your brain on Java. (ERE YOU ARE TRYING TO LEARN SOMETHING WHILE HERE YOUR BRAIN
IS DOING YOU A FAVOR BY MAKING SURE THE LEARNING DOESNT STICK 9OUR BRAINS THINKING h"ETTER
LEAVE ROOM FOR MORE IMPORTANT THINGS LIKE WHICH WILD ANIMALS TO AVOID AND WHETHER NAKED
SNOWBOARDING IS A BAD IDEAv 3O HOW DO YOU TRICK YOUR BRAIN INTO THINKING THAT YOUR LIFE
DEPENDS ON KNOWING *AVA
ix
1 Breaking the Surface
Java takes you to new places. &ROM ITS HUMBLE RELEASE TO THE PUBLIC AS THE
WIMPY VERSION *AVA SEDUCED PROGRAMMERS WITH ITS FRIENDLY SYNTAX OBJECT ORIENTED
FEATURES MEMORY MANAGEMENT AND BEST OF ALLTHE PROMISE OF PORTABILITY 7ELL TAKE A QUICK
DIP AND WRITE SOME CODE COMPILE IT AND RUN IT 7ERE TALKING SYNTAX LOOPS BRANCHING AND WHAT
MAKES *AVA SO COOL $IVE IN
2 A Trip to Objectville
I was told there would be objects. )N #HAPTER WE PUT ALL OF OUR CODE
IN THE MAIN METHOD 4HATS NOT EXACTLY OBJECT ORIENTED 3O NOW WEVE GOT TO LEAVE THAT
PROCEDURAL WORLD BEHIND AND START MAKING SOME OBJECTS OF OUR OWN 7ELL LOOK AT WHAT
MAKES OBJECT ORIENTED // DEVELOPMENT IN *AVA SO MUCH FUN 7ELL LOOK AT THE DIFFERENCE
BETWEEN A CLASS AND AN OBJECT 7ELL LOOK AT HOW OBJECTS CAN IMPROVE YOUR LIFE
Chair Wars (Brad the OO guy vs. Larry the procedural guy) 28
Inheritance (an introduction) 31
Overriding methods (an introduction) 32
What’s in a class? (methods, instance variables) 34
Making your first object 36
Using main() 38
Guessing Game code 39
Exercises and puzzles 42
x
3 Know Your Variables
Variables come in two flavors: primitive and reference.
4HERES GOTTA BE MORE TO LIFE THAN INTEGERS 3TRINGS AND ARRAYS 7HAT IF YOU HAVE A 0ET/WNER
OBJECT WITH A $OG INSTANCE VARIABLE /R A #AR WITH AN %NGINE )N THIS CHAPTER WELL UNWRAP
THE MYSTERIES OF *AVA TYPES AND LOOK AT WHAT YOU CAN DECLARE AS A VARIABLE WHAT YOU CAN PUT
IN A VARIABLE AND WHAT YOU CAN DO WITH A VARIABLE !ND WELL FINALLY SEE WHAT LIFE IS TRULY LIKE
ON THE GARBAGE COLLECTIBLE HEAP
xi
5 Extra-Strength Methods
Let’s put some muscle in our methods. 9OU DABBLED WITH VARIABLES
PLAYED WITH A FEW OBJECTS AND WROTE A LITTLE CODE "UT YOU NEED MORE TOOLS ,IKE
OPERATORS !ND LOOPS -IGHT BE USEFUL TO GENERATE RANDOM NUMBERS !ND TURN
A 3TRING INTO AN INT YEAH THAT WOULD BE COOL !ND WHY DONT WE LEARN IT ALL BY BUILDING
SOMETHING REAL TO SEE WHAT ITS LIKE TO WRITE AND TEST A PROGRAM FROM SCRATCH -AYBE A
he GAME LIKE 3INK A $OT #OM SIMILAR TO "ATTLESHIP
e ’r e g o n na build tame
W t Com g
Sink a Do Building the Sink a Dot Com game 96
Starting with the Simple Dot Com game (a simpler version) 98
!
Writing prepcode (pseudocode for the game) 100
"
'OCOM
xii
7 Better Living in Objectville
Plan your programs with the future in mind. 7HAT IF YOU COULD WRITE
CODE THAT SOMEONE ELSE COULD EXTEND EASILY 7HAT IF YOU COULD WRITE CODE THAT WAS FLEXIBLE
FOR THOSE PESKY LAST MINUTE SPEC CHANGES 7HEN YOU GET ON THE 0OLYMORPHISM 0LAN YOULL
LEARN THE STEPS TO BETTER CLASS DESIGN THE TRICKS TO POLYMORPHISM THE WAYS TO MAKE
FLEXIBLE CODE AND IF YOU ACT NOWA BONUS LESSON ON THE TIPS FOR EXPLOITING INHERITANCE
8
Serious Polymorphism
Inheritance is just the beginning. 4O EXPLOIT POLYMORPHISM WE NEED
INTERFACES 7E NEED TO GO BEYOND SIMPLE INHERITANCE TO FLEXIBILITY YOU CAN GET ONLY BY
DESIGNING AND CODING TO INTERFACES 7HATS AN INTERFACE ! ABSTRACT CLASS 7HATS AN
ABSTRACT CLASS ! CLASS THAT CANT BE INSTANTIATED 7HATS THAT GOOD FOR 2EAD THE CHAPTER
xiii
9 Life and Death of an Object
Objects are born and objects die. 9OURE IN CHARGE 9OU DECIDE WHEN AND
HOW TO CONSTRUCT THEM 9OU DECIDE WHEN TO ABANDON THEM 4HE 'ARBAGE #OLLECTOR GC
RECLAIMS THE MEMORY 7ELL LOOK AT HOW OBJECTS ARE CREATED WHERE THEY LIVE AND HOW TO
KEEP OR ABANDON THEM EFFICIENTLY 4HAT MEANS WELL TALK ABOUT THE HEAP THE STACK SCOPE
CONSTRUCTORS SUPER CONSTRUCTORS NULL REFERENCES AND GC ELIGIBILITY
The stack and the heap, where objects and variables live 236
calls
When someone od, this Methods on the stack 237
et h
the go() m oned. His Where local variables live 238
Duck is aband has been
only reference for a Where instance variables live 239
reprogrammed k. The miracle of object creation 240
Du ec differ
ent Duc Constructors (the code that runs when you say new) 241
t
ck obj
Initializing the state of a new Duck 243
d
Overloaded constructors 247
Du Heap Superclass constructors (constructor chaining) 250
ck objec
t
Static variables
are shared by
10 Numbers Matter
Do the Math. 4HE *AVA !0) HAS METHODS FOR ABSOLUTE VALUE ROUNDING MINMAX ETC
"UT WHAT ABOUT FORMATTING 9OU MIGHT WANT NUMBERS TO PRINT EXACTLY TWO DECIMAL POINTS
OR WITH COMMAS IN ALL THE RIGHT PLACES !ND YOU MIGHT WANT TO PRINT AND MANIPULATE DATES
all instances of TOO !ND WHAT ABOUT PARSING A 3TRING INTO A NUMBER /R TURNING A NUMBER INTO A 3TRING
a class.
7ELL START BY LEARNING WHAT IT MEANS FOR A VARIABLE OR METHOD TO BE STATIC
static variable:
iceCream Math class (do you really need an instance of it?) 274
kid instance two
kid instance one static methods 275
xiv
11 Risky Behavior
Stuff happens. 4HE FILE ISNT THERE 4HE SERVER IS DOWN .O MATTER HOW GOOD A
PROGRAMMER YOU ARE YOU CANT CONTROL EVERYTHING 7HEN YOU WRITE A RISKY METHOD YOU NEED
CODE TO HANDLE THE BAD THINGS THAT MIGHT HAPPEN "UT HOW DO YOU KNOW WHEN A METHOD IS
RISKY 7HERE DO YOU PUT THE CODE TO HANDLE THE EXCEPTIONAL SITUATION )N THIS CHAPTER WERE
GOING TO BUILD A -)$) -USIC 0LAYER THAT USES THE RISKY *AVA3OUND !0) SO WE BETTER FIND OUT
The compiler guarantees (it checks) that you’re aware of the risks 321
class Cow {
Catching exceptions using a try/catch (skateboarder) 322
class Bar { void moo() {
void go() { if (serverDown){
}
moo();
1 }
explode();
Flow control in try/catch blocks 326
}
int stuff() {
}
x.beep();
}
} calls risky method The finally block (no matter what happens, turn off the oven!) 327
Catching multiple exceptions (the order matters) 329
your code class with a
risky method Declaring an exception (just duck it) 335
Handle or declare law 337
Code Kitchen (making sounds) 339
Exercises and puzzles 348
class MyInner {
void go() { Your first GUI 355
} Getting a user event 357
}
Implement a listener interface 358
}
Getting a button’s ActionEvent 360
Putting graphics on a GUI 363
The outer and inner objects
are now intimately linked. Fun with paintComponent() 365
oute
r
xv
13 Work on your Swing
Swing is easy. 5NLESS YOU ACTUALLY CARE WHERE EVERYTHING GOES 3WING CODE LOOKS
EASY BUT THEN COMPILE IT RUN IT LOOK AT IT AND THINK hHEY THATS NOT SUPPOSED TO GO THEREv
4HE THING THAT MAKES IT EASY TO CODE IS THE THING THAT MAKES IT HARD TO CONTROLTHE ,AYOUT
-ANAGER "UT WITH A LITTLE WORK YOU CAN GET LAYOUT MANAGERS TO SUBMIT TO YOUR WILL )N
THIS CHAPTER WELL WORK ON OUR 3WING AND LEARN MORE ABOUT WIDGETS
14 Saving Objects
Objects can be flattened and inflated. /BJECTS HAVE STATE AND BEHAVIOR
"EHAVIOR LIVES IN THE CLASS BUT STATE LIVES WITHIN EACH INDIVIDUAL OBJECT )F YOUR PROGRAM
NEEDS TO SAVE STATE YOU CAN DO IT THE HARD WAY INTERROGATING EACH OBJECT PAINSTAKINGLY
WRITING THE VALUE OF EACH INSTANCE VARIABLE /R YOU CAN DO IT THE EASY // WAYYOU SIMPLY
FREEZE DRY THE OBJECT SERIALIZE IT AND RECONSTITUTE DESERIALIZE IT TO GET IT BACK
xvii
16 Data Structures
Sorting is a snap in Java. 9OU HAVE ALL THE TOOLS FOR COLLECTING AND MANIPULATING
YOUR DATA WITHOUT HAVING TO WRITE YOUR OWN SORT ALGORITHMS 4HE *AVA #OLLECTIONS
&RAMEWORK HAS A DATA STRUCTURE THAT SHOULD WORK FOR VIRTUALLY ANYTHING YOULL EVER NEED
TO DO 7ANT TO KEEP A LIST THAT YOU CAN EASILY KEEP ADDING TO 7ANT TO FIND SOMETHING BY
NAME 7ANT TO CREATE A LIST THAT AUTOMATICALLY TAKES OUT ALL THE DUPLICATES 3ORT YOUR CO
WORKERS BY THE NUMBER OF TIMES THEYVE STABBED YOU IN THE BACK
Collections 533
Sorting an ArrayList with Collections.sort() 534
List 0 1 2 3 Generics and type-safety 540
Sorting things that implement the Comparable interface 547
Sorting things with a custom Comparator 552
The collection API—lists, sets, and maps 557
Set Avoiding duplicates with HashSet 559
Overriding hashCode() and equals() 560
HashMap 567
Using wildcards for polymorphism 574
Map “Ball”
“Ball1” “Fish”
“Ball2” “Fish”“Car”
“Car”
Exercises and puzzles 576
foo
10 110 1
0 11 0
Making an executable JAR (Java ARchives) 585
MyApp.jar 001 10
001 01
xviii
18
Distributed Computing
Being remote doesn’t have to be a bad thing. 3URE THINGS ARE EASIER
WHEN ALL THE PARTS OF YOUR APPLICATION ARE IN ONE PLACE IN ONE HEAP WITH ONE *6- TO RULE
THEM ALL "UT THATS NOT ALWAYS POSSIBLE /R DESIRABLE 7HAT IF YOUR APPLICATION HANDLES
POWERFUL COMPUTATIONS 7HAT IF YOUR APP NEEDS DATA FROM A SECURE DATABASE )N THIS
CHAPTER WELL LEARN TO USE *AVAS AMAZINGLY SIMPLE 2EMOTE -ETHOD )NVOCATION 2-) 7ELL
ALSO TAKE A QUICK PEEK AT 3ERVLETS %NTERPRISE *AVA "EANS %*" AND *INI
Client Server Java Remote Method Invocation (RMI), hands-on, very detailed 614
Servlets (a quick look) 625
RMI STUB RMI SKELETON Enterprise JavaBeans (EJB), a very quick look 631
Jini, the best trick of all 632
Se e
r
C li
ent helper rvice help Se
rvice objec
t
C li
Building the really cool universal service browser 636
ent object
The End 648
A
Appendix A
The final Code Kitchen project. !LL THE CODE FOR THE FULL CLIENT SERVER CHAT
BEAT BOX 9OUR CHANCE TO BE A ROCK STAR
!NDY GROOVE
REVISED
#HRIS GROOVE
BEAT
.IGEL DANCE
B
Appendix B
The Top Ten Things that didn’t make it into the book. 7E CANT SEND
YOU OUT INTO THE WORLD JUST YET 7E HAVE A FEW MORE THINGS FOR YOU BUT THIS IS THE END OF THE
BOOK !ND THIS TIME WE REALLY MEAN IT
Top Ten List 660
i Index 677
xix
how to use thOIS book
Intro
xxi
how to use this book
xxii intr o
the intra
Make It visual. Images are far more memorable than words RMI"'(loo~
~ite
alone, and make learning much more effective (Up to 89%
Improvement in recall and transfer studies) . It also makes
things more understandable. Put the words within
or near the graphics they relate to, rather than on the
bottom or on another page, and learners will be up to twice
as likely to solve problems related to the content.
Touch their emotlon8. We now know that your ability to remember something Is largely
dependent on Its emotional content. You remember what you care about. You remember when
you feel somethIng. No we're not talking heart-wrenching stories about a boy and hIs dog .
We're talking emotions like surprise, curiosity, fun, "what the ...T", and the feeling of "I Rulel"
that comes when you solve a puzzle, learn something everybody else thinks Is hard, or realize
you know something that ·"m more technical than thou' Bob from engineering doe$n't.
XXiv in t ra
the intro
A conversational style helps because people tend to pay more attention when they
perceive that they're in a conversation, since they're expected to follow along and
hold up their end. The amazing thing is, your brain doesn't necessarily care that
the "conversation" is between you and a book! On the other hand, if the writing
style is formal and dry, your brain perceives it the same way you experience being
lectured to while sitting in a roomful of passive attendees. No need to stay awake.
But pictures and conversational style are just the beginning.
~8\"Barlle"
because your brain is tuned to learn more deeply when it's forced to make
evaluations and judgements.
We included chaIknges, with exercises, and by asking qrustions that don't always have
a straight answer, because your brain is tuned to learn and remember when it has
to work at something (just as you can't get your body in shape by watching people
at the gym). But we did our best to make sure that when you're working hard, it's
on the right things: That you'renot spending one exITa denLfrile processing a hard-to-
understand example, or parsing difficult,jargon-Iaden, or extremely terse text.
We used an 80/20 approach. We assume that if you 're going for a PhD in java,
this won't be your only book. So we don't talk about everything. Just the stuff you'll
actually use.
xxvi Intra
the intra
Herels what YOU ca., do to be.,d your
brah1 i"to subltdssiot1.
So, we did our part. The rest is up to you . These tips are a
starting point; Listen to your brain and figure out what works
for you and what doesn't. Try new things.
•
the answer. Imagine that someone really is
asking the question. The more deeply you Talk about It. Out loud.
force your brain to think, the better chance Speaking activates a different part of
you have of learning and remembering. the brain. If you're trying to understand
something, or increase your chance of
Do the exercises. Write your own notes. remembering it later, say it out loud. Better
We put them in, but if we did them for you, still, try to explain it out loud to someone
that would be like having someone else else . You'll learn more quickly, and you might
do your workouts for you . And don't just uncover ideas you hadn't known were there
look at the exercises. Use a pencil. There's when you were reading about it.
plenty of evidence that physical activity
while learning can increase the learning. Listen to your brain.
Pay attention to whether your brain is getting
Read the "There are No Dumb Questions" overloaded. If you find yourself starting to ski m
That means all of them. They're not the surface or forget what you just read, it's
optional side-bars-they're part of the core time for a break. Once you go past a certain
contentl Sometimes the questions are more point, you won't learn faster by trying to shove
useful than the answers. more in, and you might even hurt the process.
Make this the last thing you read before . . Type and run the code.
bed. Or at least the last challengIng thing. Type and run the code examples. Then you
Part of the learning (especially the transfer can experiment with changing and improving
to long-term memory) happens afleryou put the code (or breaking it, which is sometimes
the book down. Your brain needs time on the best way to figure alit what's really
its own , to do more processing. If you put in happening). For long examples or Ready-bake
something new during that processing-time, code, you can download the source files from
some of what you just learned will be lost. headfirstjava.corn
SmlNG UP JAVA - - - - - - - - - - - - - - - - - - ,
• If you don't already have a 1.5 orgreater Java 2 Standard Edition SDK (Software
Development Kit), you need it. If you're on Linux, Windows, or Solaris, you can gellt for free
from java.sun.com (Sun's websile forJava developers). It usually takes nomore than two clicks
from the main page togel to the J2SE downloads page . Get the latest non-beta version posted.
The SDK includes everything you need tocompile and run Java.
If you're running Mac OS X10.4. the Java SDK isalready installed. It's partof OS X, and you
don't have todo anything else. If you're on an earlier version of OS X. you have an earlier
version ofJava that will wor1< for95% of the code in this book.
Note: This book is based on Java 1.5, but forstunningly unclear mar1<eting reasons, shortly
before release, Sun renamed It Java 5, while still keeping "1 .5" asthe version number forthe
developer's kit So, if you see Java 1.5 orJava 5 orJava 5.0, or "Tiger" (version 5's original
code-name), they all mean the same thing. There was never a Java 3.0 or 4.Q--it jumped from
version 1.4 to5.0,bu1 you will still find places where it'scalled 1.5 instead of 5. Don'l ask.
(Oh, and just 10 make il more entertaining, Java 5 and the Mac OS X 10.4 were both given the
same code-name of"Tiger", and since OS X 10.4 is the version of the Mac OS you need to run
Java 5, vou'llhear people talk about "Tiger on TIger". II justmeans Java 5 on OS X 10.4).
• The SDK does not include the API documentatIon, and you need that! Go back tojava.sun.
com and get the J2SE APr documentation. You can also access the API docs online, without
downloading them, but thaI's apain. Trusl us, irs worth the download.
• You need a texteditor. Virtually any text editor will do (vi, emacs, pica), including the GUI ones
that come with most operating systems. Nolepad, Wordpad, TextEdlt, etc. allwork, aslong as
you make sure they don'l append a ".txt" on tothe end of your source code.
• Once you've downloaded and unpackedfzippedfwhatever (depends on which version and for
which OS). you need to add an entry toyour PATH environment variable that points tothe fbln
directory inside the main Java directory. For example, if the J2SDK puts a directory on your
drive called "j2sdk1.5,O', look inside that directory and you'lI find the "bin" directory where the
Java binaries (the tools) live. The bin directory is the one you need a PATH to, sothaI when you
type:
% javac
atthe command-line, your terminal will know how tofind the javac compiler.
Note: if you have trouble with you installation, we recommend you gotojavaranch.com, and join
the Java-Beginning forum! Actually, you should dothat whether you have trouble or not.
Nole: much of the code from this book Is available at wlckedlysmart.com
xxvlll intra
Discovering Diverse Content Through
Random Scribd Documents
"Joan Strokes a Sillabub or Twain."
Toes:
Big toe - Tom Barker or Toe Tipe.
Toe 2 - Long Rachel " Penny Wipe.
Toe 3 - Minnie Wilkin " Tommy Tistle.
Toe 4 - Milly Larkin " Billy Whistle.
Little toe - Little Dick " Tripping-go.
This is another:
Here sits the Lord Mayor:
Here sit his men;
Here sits the cockadoodle;
Here sits the hen;
Here sits the little chickens;
Here they run in;
Chinchopper, chinchopper, chinchopper chin.
30.
For many years I read this poem as if the accents
in the first line of each stanza fell on the first and
third word—the two "I's." It was stupid of me, for
clearly the accent should fall (lightly) on the second
syllable of the "remembers." Apart from the accents
or stresses in a line of verse, there is the rise and fall
of the voice, a kind of tune in the saying of it. If the
right tune is not caught, then the difference is as
much as if one sniffed a wallflower and it smelt like
African mimosa. And to me, as to hundreds of
thousands of Englishmen, this poem is as familiar,
long-endeared and refreshing as wallflower, Sweet
William, or Old Man. This is the second or third time
I have made remarks about the rhythm, lilt or tune
of a poem; and it won't be the last. May I be
forgiven, for as Chaucer wrote to his small son Louis
when he was sharing with him his love of astronomy:
"Soothly me seemeth betre to writen unto a child
twice a good sentence, then he forget it ones." As
for his elders, even thrice may be short commons.
32.
35.
Only a single copy of the old play, Mundus et
Infans, from which this fragment is taken, is known
to be in existence. It was printed by Wynkyn de
Worde in 1522; and was written roundabout 1500.
The lines need a slow reading to get the run and
lilt of them: and even at that they jog and creak like
an old farm-cart. But the boy, Dalyaunce, if one
takes a little pains, will come gradually out of them
as clear to the eye as if you had met him in the
street to-day, on his way to "schole" for yet another
"docking."
Clothes, houses, customs, food a little, thoughts a
little, knowledge, too—all change as the years and
centuries go by, but Dalyaunce under a thousand
names lives on. It never occurred to me when I was
young to think that the children in Rome talked Latin
at their games, and that Solomon and Caesar,
Prester John and the Grand Khan knew in their
young days what it means to be homesick and none
too easy to sit down. Yet there are knucklebones and
dolls in London that the infant subjects of the
Pharaohs played with, and at Stratford Grammar
School, for all to see, is Shakespeare's school desk.
As for Dalyaunce, "dockings" are not nowadays so
harsh as once they were.
In proof of this, there is a passage from a book,
telling of his own life as a small boy, written by
Guibert de Nogent. He is speaking of his childhood,
about the year when William the Conqueror landed
at Hastings:
'So, after a few of the evening hours had been
passed in that study, during which I had been beaten
even beyond my deserts, I came and sat at my
mother's knees. She, according to her wont, asked
whether I had been beaten that day; and I, unwilling
to betray my master, denied it; whereupon, whether
I would or no, she threw back my inner garment
(such as men call shirt), and found my little ribs
black with the strokes of the osier, and rising
everywhere into weals. Then, grieving in her inmost
bowels at this punishment so excessive for my
tender years, troubled and boiling with anger, and
with brimming eyes, she cried, "Never now shalt
thou become a clerk, nor shalt thou be thus tortured
again to learn thy letters!" Whereupon, gazing upon
her with all the seriousness that I could call to my
face, I replied, "Nay, even though I should die under
the rod, I will not desist from learning my letters and
becoming a clerk!"'
Still, there were more merciful schoolmasters
than Guibert de Nogent's, even in days harsh as his;
as this further extract from Mr. G. G. Coulton's
enticing Medieval Garner shows:
'One day, when a certain Abbot, much reputed for
his piety, spake with Anselm concerning divers points
of Monastic Religion, and conversed among other
things of the boys that were brought up in the
cloister, he added: "What, pray, can we do with
them? They are perverse and incorrigible; day and
night we cease not to chastise them, yet they grow
daily worse and worse."
Whereat Anselm marvelled, and said, "Ye cease
not to beat them? And when they are grown to
manhood, of what sort are they then?" "They are
dull and brutish," said the other.
Then said Anselm, "With what good profit do ye
expend your substance in nurturing human beings till
they become brute beasts?... But I prithee tell me,
for God's sake, wherefore ye are so set against
them? Are they not human, sharing in the same
nature as yourselves? Would ye wish to be so
handled as ye handle them? Ye will say, 'Yes, if we
were as they are.' So be it, then; yet is there no way
but that of stripes and scourges for shaping them to
good? Did ye ever see a goldsmith shape his gold or
silver plate into a fair image by blows alone? I trow
not. What then? That he may give the plate its
proper shape, he will first press it gently and tap it
with his tools; then again he will more softly raise it
with discreet pressure from below, and caress it into
shape. So ye also, if ye would see your boys adorned
with fair manners, ye should not only beat them
down with stripes, but also raise their spirits and
support them with fatherly kindness and pity'...."
There was an old woodcut, hanging on Mr.
Nahum's wall in his tower room, showing a boy in
the middle ages being whipped in a kind of machine
(something like a roasting-jack), and a schoolmaster
standing by, nicely smiling, in a gown. When
Coleridge was a bluecoat boy at Christ's Hospital with
Charles Lamb, he seems to have had a headmaster
of this kind: "'Boy!' I remember Bowyer saying to me
once when I was crying the first day after my return
after the holidays,—'Boy! the school is your father!
Boy! the school is your mother! Boy! the school is
your brother! the school is your sister! the school is
your first cousin, and your second cousin, and all the
rest of your relations! Let's have no more crying.' ...
"Mrs. Bowyer was no comforter, either. Val. Le
Grice and I were once going to be flogged for some
domestic misdeed, and Bowyer was thundering away
at us, by way of prologue, when Mrs. B. looked in
and said, 'Flog them soundly, sir, I beg!' This saved
us. Bowyer was so nettled at the interruption that he
growled out, 'Away, woman, away!' and we were let
off."
Coleridge tells of yet another schoolmaster,
whose name, like Bowyer and birch, also began with
a B.: "Busby was the father of the English public
school system. He was headmaster of Westminster
through the reign of Charles I., the Civil War, the
Protectorate, the reign of Charles II., and the
Revolution of 1688. Under him Westminster became
the first school in the kingdom. When Charles II.
visited the school, Busby stalked before the King with
his hat upon his head, whilst his most sacred majesty
meekly followed him. In private Busby explained that
his conduct was due to the fact that he could not
allow, for discipline's sake, the boys to imagine there
could be a greater man than himself alive." Quite
rightly, of course.
There is, too, the story of the little Lion that went
to school to the Bear. Being, though of royal blood, a
good deal of a dunce, Master Lion bore many sound
cuffings from Dr. Bruin on the road to learning, and
found it hot and dusty. After such administrations, he
would sometimes sit in the sun under a window,
learning his task and brooding on a day when he
would return to the school and revenge himself upon
the Doctor for having treated him so sore. But
Master Lion was all this time growing up, and so
many were the cares of State when he had left his
books and become a Prince and Heir Apparent, that
for a time he had no thought for his old school.
Being, however, in the Royal Gardens one sunny
morning, and seeing bees busy about their hive, he
remembered an old saying on the sweetness of
knowledge and wisdom, and this once more
reminded him of his old Master. Bidding his servants
sling upon a rod half a dozen of the hives, he set out
to visit Dr. Bruin. The hives were taken into his study,
and the bees, being unused to flitting within walls
out of the sunshine, angrily sang and droned about
the head of the old schoolmaster as he sat at his
desk. Their stings were of little account against his
thick hide, but their molestation was a fret, and he
presently cried aloud, "Would that the Prince had
kept his gifts to himself!" The Prince, who was
standing outside the door, listening and smiling to
himself, thereupon cried out: "Ah! Dr. Bruin, when I
was under your charge, you often heavily smit and
cuffed me with those long-clawed paws of yours.
Now I am older, and have learned how sweet and
worthy is the knowledge they instilled. This too will
be your experience. My bees may fret and buzz and
sting a little now, but you will think of me more
kindly when you shall be tasting their rich honey in
the Winter that is soon upon us." And Dr. Bruin,
peering out at the Prince from amid the cloud of the
bees, when he heard him thus call Tit for Tat, he
couldn't help but laugh.
And last—to return to Coleridge once more, who,
in the bad old days, so far as food goes, never "had
a belly full" at Christ's Hospital, and whose appetite
was only "damped, never satisfied,"—here is one of
his earliest letters (to his elder brother George),
which may have an (indirect) reference to Dr.
Bowyer's birch:
Dear Brother,—You will excuse me for reminding you that, as
our holidays commence next week, and I shall go out a good
deal, a good pair of breeches will be no inconsiderable accession
to my appearance. For though my present pair are excellent for
the purpose of drawing mathematical figures on them, and
though a walking thought, sonnet or epigram would appear in
them in very splendid type, yet they are not altogether so well
adapted for a female eye—not to mention that I should have
the charge of vanity brought against me for wearing a looking-
glass. I hope you have got rid of your cold—and I am
Your affectionate brother,
Samuel Taylor Coleridge
40.
This little jingle and Nos. 15, 16, 68, 75, etc., are
Singing Game Rhymes, of which scores have been
collected from the mouths of children near and far
from all over the Kingdom, and are now to be found
in print in Lady Gomme's two stout engrossing
volumes entitled Traditional Games. In these more
than seven hundred games are described, including
Rakes and Roans, Rockety Row, Sally Go Round the
Moon, Shuttlefeather, Spannims, Tods and Lambs,
Whigmeleerie, Allicomgreenaie, Bob-Cherry, Oranges
and Lemons, Cherry Pit, Thumble-bones, Lady on
Yandor Hill, Hechefragy, and Snail Creep.
A good many of these games have singing
rhymes to them. And the words of them vary in
different places. For the children in each of twenty or
more villages and towns may have their own
particular version of the same rhyme. As for the
original from which all such versions must once have
come—that may be centuries old. Like the Nursery
Rhymes, they were most of them in the world ages
before our great-great-great-grand-dams were
babies in their cradles. The noble game of Hop
Scotch, for instance, Lady Gomme tells us, was in
favour before the year I.
The most mysterious rhymes of all are said to
refer to ancient tribal customs, rites and ceremonies
—betrothals, harvest-homes, sowings, reapings, well-
blessings, dirges, divinations, battles, hunting, and
exorcisings—before even London was else than a few
hovels by its river's side. Rhymes such as these
having been passed on from age to age and from
one piping throat to another, have grown worn and
battered of course, and become queerly changed in
their words.
These from Mr. Nahum's book have their own
differences too. He seems to have liked best those
that make a picture, or sound uncommonly sweet
and so carry the fancy away. Any little fytte or jingle
or jargon of words that manages that is like a charm
or a talisman, and to make new ones is as hard as to
spin silk out of straw, or to turn beech leaves into
fairy money. When one thinks, too, of the myriad
young voices that generation after generation have
carolled these rhymes into the evening air, and now
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.
ebookfinal.com