Get Murach S Java Programming 4th Edition Joel Murach PDF Ebook With Full Chapters Now
Get Murach S Java Programming 4th Edition Joel Murach PDF Ebook With Full Chapters Now
com
https://ebookname.com/product/murach-s-java-programming-4th-
edition-joel-murach/
OR CLICK BUTTON
DOWNLOAD EBOOK
https://ebookname.com/product/murach-s-android-programming-2nd-
edition-joel-murach/
https://ebookname.com/product/murach-s-c-2012-5th-edition-joel-
murach/
https://ebookname.com/product/murach-s-php-and-mysql-training-
reference-2nd-edition-joel-murach/
https://ebookname.com/product/financial-accounting-and-
reporting-12th-edition-barry-elliott/
The Timberclads in the Civil War 1st HARDCOVER Edition
Myron J.
https://ebookname.com/product/the-timberclads-in-the-civil-
war-1st-hardcover-edition-myron-j/
https://ebookname.com/product/asymmetric-catalysis-on-industrial-
scale-challenges-approaches-and-solutions-second-edition-hans-
ulrich-blaser/
https://ebookname.com/product/angel-roleplaying-game-1st-edition-
c-j-carella/
https://ebookname.com/product/thomas-hematopoietic-cell-
transplantation-4-har-cdr-edition-frederick-r-appelbaum/
https://ebookname.com/product/software-requirements-
encapsulation-quality-and-reuse-1st-edition-rick-lutowski/
CliffsAP calculus AB and BC 3rd ed Edition Kerry J.
King
https://ebookname.com/product/cliffsap-calculus-ab-and-bc-3rd-ed-
edition-kerry-j-king/
M urach
mu rach's
programming
4™ EDITION
JOEL MURACH
AN OBJECT-ORIENTED BOOK
that shows you how ro use business classes,
inheritance, and interfaces the way they’re
used in the real world
murach's
programming
4th EDITION
Joel Murach
10 9 8 7 6 5 4 3 2 1
ISBN: 978-1-890774-65-3
Contents
Introduction XV
A ppendixes
Appendix A How to set up your PC for this book 771
Appendix B How to set up your Mac for this book 111
E x p a n d e d c o n te n ts
As you work with Java SE 7, please keep in mind that all Java versions are
backwards-compatible. That means that everything in this book will also work
with future versions of the JDK.
Introduction to Java
In 1996, Sun Microsystems released a new programming language called
Java. Although Oracle bought Sun in 2010, Java remains one of the most widely
used object-oriented programming languages.
Java timeline
Year Month Event
1996 January Sun releases Java Development Kit 1.0 (JDK 1.0).
1997 February Sun releases Java Development Kit 1.1 (JDK 1.1).
1998 December Sun releases the Java 2 Platform with version 1.2
of the Software Development Kit (SDK 1.2).
1999 August Sun releases Java 2 Platform, Standard Edition (J2SE).
December Sun releases Java 2 Platform, Enterprise Edition (J2EE).
2000 May Sun releases J2SE with version 1.3 of the SDK.
2002 February Sun releases J2SE with version 1.4 of the SDK.
2004 September Sun releases J2SE 5.0 with version 1.5 of the JDK.
2006 December Sun releases Java SE 6 with version 1.6 of the JDK.
2010 April Oracle buys Sun.
2011 July Oracle releases Java SE 7 with version 1.7 of the JDK.
Description
• Versions 1.2 through 1.4 of Java are called the Software Development Kit (SDK).
• Versions 1.5 through 1.7 of Java are called the Java Development Kit (JDK).
Note
• Java SE 8 with version 1.8 of the JDK is expected to be released late in 2012.
C:Smurach\jaua\classes>java Futurellalueflpp
Monthly Payment: 1100
Continue? <y/n>:
Calculate Exit
An applet
M ike Murach and Associates - Publisher o f Professional Program m ing Books - M ozilla Firefox
r
File Edit View
- c
H isto ry .Bookmarks
& □
Tools Help
□ Mil
M ike Murach and Associates - Publish...
_L·
A servlet
M ike Murach and Associates - Publisher o f Professional Program m ing Books - M ozilla Firefox
e ’ G & □ http://w w w .m urach .com /servlet/m u ra ch.fv.F utu re V a lu eS e ivle t * | |ÎJ ’ Google P
while (choice.equalsIgnoreCase(■y"))
{
// get the input from the user
System.out.print("Enter monthly investment: ");
double monthlylnvestment = sc.nextDouble();
System.out.print("Enter yearly interest rate: ");
double interestRate = sc.nextDouble();
System.out.print("Enter number of years: ");
int years = sc.nextlnt();
Figure 1-3 The code for the console version of the Future Value application
Section 1 Essential Java skills
Java IDE
W source code
Text editor (*.java files)
Java c<>mpiler |
1r
Description
• When you develop a Java application, you develop one or more classes.
• You can use a Java IDE or any text editor to create, edit, and save the source code
for a Java class. Source code files have the java extension.
• The Java compiler translates Java source code into a platform-independent format
known as Java bytecodes. Files that contain Java bytecodes have the class exten
sion.
• The Java interpreter executes Java bytecodes. Since Java interpreters exist for all
major operating systems, Java bytecodes can be run on most platforms. A Java
interpreter is an implementation of a Java virtual machine (JVM).
• Most modem web browsers can be Java enabled. This lets applets run within these
browsers. Oracle provides a tool known as the Java Plug-in that allows you to
specify the version of the Java interpreter that you want to use.
Description
• To develop Java applications, you typically use an Integrated Development Envi
ronment (IDE) like those listed above. All of these IDEs are either free or have free
editions.
They conveyed him back by slow stages, seeing this and that
continental sight on his homeward-route, but hardly knowing what
he saw. He was in London again for a week or two in June and July
1832, attended medically in a hotel in Jermyn Street. Brought thence
by sea to Edinburgh, he passed a night, a day, and another night, in a
hotel in St. Andrew Square, in a state of utter unconsciousness; and
on the 11th of July they took him to Abbotsford. On their way thither
through the old familiar scenery he began to recognise places and
objects, and to mutter their names,—Gala Water, Buckholm,
Torwoodlee; and, when they approached Abbotsford itself, and he
caught sight of its towers, he sprang up in such a state of excitement
that they could hardly hold him in the carriage. “Ha! Willie Laidlaw!
O man, I have often thought of you,” were his first words, after his
old friend and amanuensis Laidlaw, who was waiting in the porch,
had assisted the rest in carrying him into the house, and seating him
in a chair in the dining-room. The return of consciousness which this
recognition signified became more and more marked, at least at
intervals, in the two months and ten days through which he still
lingered. He talked with those of his family who were about him,
could be shifted from room to room or even wheeled in a Bath chair
through parts of his grounds, and could listen to readings and seem
to take an interest in them. Once he insisted on being placed at his
writing-table, with paper, pens, and ink before him in the
accustomed order, and wanted to be left to himself; but, when the
pen had been put into his hand and his fingers refused to hold it,
tears trickled down his cheeks, and he gave up the attempt. There
were, as often in such cases of brain-paralysis, some days of almost
frantic vehemence, when it was painful to be near him; but these
were succeeded by a feeble quietude and a gradual ebbing-away of
life. On the 21st of September 1832, with the ripple of the Tweed
heard by those who stood round his bed, Sir Walter Scott, then only
in the sixty-second year of his age, breathed his last.
In the Diary itself the narrative of those closing years of Scott’s
life is broken short at the point where they were bringing him back
from Italy as a dying invalid. The last few months are a total blank in
the Diary; where, indeed, the entries for the later years of the
included seven are scantier and more intermittent than those for the
earlier. But it is not solely as an exact autobiographic record of the
incidents of so many memorable years of a memorable life that the
Diary is now of interest. Implicated in that main interest, and
catching the attention of the reader again and again as he advances
through the pages, are certain recurring particular informations as to
Scott’s character and ways which possess an independent interest,
and may be reverted to separately.
Bound up, for example, with the proofs furnished by the Diary of
Scott’s prodigious literary industry, there is plenty of minute
information as to his habits of composition and his rate of
composition. I do not like that word “composition” in any such
application, thinking it a miserable word for the description of the
process by which a great writer marshals the contents of his mind
and commits them to paper; but the word is current, and may serve
for the nonce. Well, Scott’s rate of composition was about the fastest
known in the history of literature. Of all his predecessors in the
literary history of the British Islands, Shakespeare seems to have
been the likest to him in this particular of fluent facility and swiftness
of production. “His mind and hand went together,” is the well-known
report concerning Shakespeare by his literary executors and editors:
“his mind and hand went together, and what he thought he uttered
with that easiness that we have scarce received from him a blot in his
papers.” One has an impression, however, that Shakespeare, with all
his facility when he had the pen in his hand, had it less constantly in
his hand, was less “eident” in the use of it (as our good northern
phrase goes), than Scott,—whether because he had less actual need
to be “eident,” or because verse, which was Shakespeare’s main
element, is intrinsically more difficult, takes more out of a man in a
given time, and so is less favourable to “eidency,” than the prose
element in which, latterly, Scott worked all but exclusively. At all
events, “eidency” and “facility” taken together, the result, in the mere
matter of quantity, was larger from Scott’s industry than from
Shakespeare’s. But it is with the “facility” that we are now concerned,
and with the proofs of this “facility” which are furnished by the
Journal in particular. The mere look of the handwriting is one of
these,—that rapid currente calamo look, without hesitation, and with
hardly an erasure, stoppage to point, or any such thing, and with the
words almost running into each other in their hurry, which is
familiar to all who have seen facsimile reproductions of any portions
of the copy of Scott’s novels, when they were written with his own
hand, and not dictated. That, however, is a characteristic common to
all his writings; and the specific interest of the Diary in this
connection is that it gives us definite information as to the amount of
writing per day which Scott usually got through in his currente
calamo style. In entry after entry there is note of the number of
pages he had prescribed to himself as a sufficient day’s “task” or
“darg,” with growls when for any reason he had fallen short of it, and
smiles of satisfaction when he had exceeded it; and from one entry
we ascertain that his maximum per day when he was in good vein
was eight pages of his own close manuscript, making forty pages of
the usual type in which his copy was set up by the printers. One can
compute the difference between that rate and any other rate of which
one may happen to have knowledge or experience; but there is no
need to conclude that Scott’s rate is to be passionately desired or
universally aimed at, or that, because it suited Scott, it would suit
others. On the contrary, one sees some disadvantages, even in Scott’s
own case, counterbalancing the advantages of such extreme rapidity.
He was aware of the fact himself; and he once quotes, with some
approbation, an admirable maxim of Chaucer on the subject:—
“There n’ is no werkman, whatsoever he be,
That may both werken well and hastily.”
PART I.—1809–1818
Early in November 1809 two boys walked together from
Ecclefechan in Dumfriesshire to Edinburgh, to attend the classes in
the University there. The distance, as the crow flies, is about sixty
miles; and the boys took three days to it. The elder, who had been at
College in the previous session, and therefore acted as the guide,
generally stalked on a few paces ahead, whistling an Irish tune to
himself. The younger, who was not quite fourteen years of age, and
had never been out of Dumfriesshire before, followed rather wearily,
irritated by the eternal Irish tune in front of him, but mainly given up
to his own “bits of reflections in the silence of the moors and hills.”
The elder of the two boys was a Thomas Smail, afterwards of some
note as a Burgher minister in Galloway; the younger was Thomas
Carlyle.
Of the arrival of the two boys in Edinburgh on the 9th of
November 1809, after their third day’s walk of twenty miles, and of
Carlyle’s first stroll, that afternoon, under Smail’s convoy, through
some of the main streets, to see the sights, one may read in his own
Reminiscences. What he remembered best of that first stroll was the
look of the Old High Street, with St. Giles’s Kirk on one side and the
old Luckenbooths running up the middle in its broadest part, but
chiefly the amazing spectacle to which he was introduced when Smail
pushed open a door behind St. Giles’s Kirk, and he found himself in
the outer house of the Court of Session, amid the buzz of the lawyers
and others walking up and down, with the red-robed judges hearing
cases in their little throned enclosures.
Content with the description of that first stroll, he leaves us to
imagine how, in the first days and weeks of his residence in the city,
he gradually extended his acquaintance with it by further rambles,
and by inspection of this and that interesting to a young stranger.
The task is not difficult. The lodging which Smail and he had taken
between them was, he says, “a clean-looking, most cheap lodging,” in
the “poor locality” called Simon Square. The locality still survives
under that name, though hardly as a square any longer, but only a
poor street, at the back of Nicolson Street, on the left hand as one
goes southwards from the University, and accessible most directly by
an arched passage called Gibb’s Entry. From that obscure centre, by
walks from it in the mornings, and returns to it during the day and in
the evenings, we can see the little Dumfriesshire fellow gradually
conquering for himself some notion of the whole of that Edinburgh
into which he had come. It was the old Edinburgh, of less than
100,000 inhabitants, which we think of so fondly now as the
Edinburgh of Scott before his novels had been heard of and when his
fame depended chiefly on his poems, of Jeffrey in the early heyday of
his lawyership and editorship of the Edinburgh Review, and of the
other local celebrities, Whig and Tory, immortalised in tradition and
in Cockburn’s Memorials.
It was chiefly of the externals of the city that the boy was making
his notes; for the living celebrities, as he tells us, were hardly even
names to him then. Scott and Jeffrey, he says, may have been in the
peripatetic crowd of wigged and gowned lawyers he had seen in the
hall of the Parliament House on the day of his arrival; but the only
physiognomy he had marked there so as to know it again was that of
John Clerk of Eldin. A reminiscence which I have heard from his own
lips enables me, however, to connect his first days in Edinburgh with
the memory of at least one Edinburgh worthy of a still elder
generation. It was on the 18th of December 1809, or just six weeks
after Carlyle’s arrival in Edinburgh, that the well-known Dr. Adam,
Rector of the High School, died; and I have heard Carlyle tell how the
event impressed him, and how he went to see the funeral procession
of the old scholar start from the High School yard at the foot of
Infirmary Street. With a number of other boys, he said, he hung on
by the railings outside, looking in upon the gathered assemblage of
mourners. He seemed to remember the scene with peculiar
vividness; for, after picturing himself as a boy hanging on by the
High School railings, and watching the incidents within, he added,
“Ay me! that moment then, and this now, and nothing but the
rushing of Time’s wings between!”[10] He had a liking to the last for
old Dr. Adam. I have heard him say that any Scotsman who was at a
loss on the subject of shall and will would find the whole doctrine in
a nutshell in two or three lucid sentences of Dr. Adam’s Latin
Grammar; and I had an idea at the time that he had used this brief
precept of Dr. Adam’s little book in his own early practice of English.
At the date of Dr. Adam’s death Carlyle had been for six weeks a
student in the University, with pupils of Dr. Adam among his fellow-
students on the same benches. One can see his matriculation
signature, “Thomas Carlyle,” in his own hand,—a clear and good
boyish hand, differing considerably from that which he afterwards
wrote,—in the alphabetically arranged matriculation list of the Arts
Students of the session 1809–10. It is the sixth signature under the
letter C, the immediately preceding signature being that of a
Dumfries youth named “Irvine Carlyle” (spelt so, and not “Irving
Carlyle,”) of whom there is mention in the Reminiscences. It is clear
that the two Carlyles were drawn to each other by community of
name and county, if not by kin, and had gone up for matriculation
together.
The College of those days was not the present complete
quadrangle, but a chaotic jumble of inconvenient old class-rooms,
with only parts of the present building risen among them, and
finished and occupied. The classes which Carlyle attended in his first
session were the 1st Humanity Class, under Professor Alexander
Christison, and the 1st Greek Class, under Professor George Dunbar.
From an examination of the records I find that among his class-
fellows in both classes were the aforesaid Irving Carlyle, and Lord
Inverurie, afterwards seventh Earl of Kintore, and that among his
class-fellows in the 1st Greek Class was the late venerable Earl of
Wemyss, then Lord Elcho. Neither from the records nor from the
Reminiscences can anything be gathered of the history of the two
classes through the session, or of the place taken in each by the
young Dumfriesshire boy among the medley of his fellow-students,
from 150 to 200 in number. The Latin class-room, we do learn from
the Reminiscences, was a very dark room, so that Professor
Christison, having two students of the name of Carlyle, never
succeeded in distinguishing the one from the other; which was all the
harder, Carlyle thought, because the other Carlyle, Mr. Irving
Carlyle, was not only different physically, being “an older,
considerably bigger boy, with red hair, wild buck teeth, and scorched
complexion,” but was also the worst Latinist in the whole class.
Carlyle himself had been so well grounded in Latin at Annan School
that probably he could have held his own in the class even against
Dr. Adam’s pupils from the Edinburgh High School. To the end of his
life, at all events, he was a fair Latinist. To Greek he never in later life
made any pretence; and whatever Greek he did learn from Dunbar,—
which can have been but small in quantity,—must have faded
through disuse. He retained, however, a high admiration for the
Elementa Linguæ Græcæ of Dr. James Moor of Glasgow,—which
was, I suppose, the Greek grammar then used in Dunbar’s class,—
thinking it the very best grammar of any language for teaching
purposes he had ever seen.
While we know so little of Carlyle’s Greek and Latin studies in
his first University session, it is something to know that he was a
pretty diligent reader of books that session from the College Library.
Having examined a dusty old folio of the library receipts and
outgoings, which chances to have been preserved, I am able to report
that Carlyle had duly paid, before December 1809, his deposit or
security of one guinea, entitling him to take books out, and that, in
that month and the succeeding month of January 1810, he had out
the following books, in parcels or in succession, in the following
order:—Robertson’s History of Scotland, vol. ii.; Cook’s Voyages;
Byron’s Narrative, i.e. “the Hon. John Byron’s Narrative of the Great
Distresses suffered by Himself and his Companions on the Coast of
Patagonia, 1740–6”; the first volume of Gibbon; two volumes of
Shakespeare; a volume of the Arabian Nights; Congreve’s Works;
another volume of the Arabian Nights; two volumes of Hume’s
England; Gil Blas; a third volume of Shakespeare; and a volume of
the Spectator. This is a sufficiently remarkable series of volumes for
a boy of fourteen to have had out from the College library; and other
books from other libraries may have been lying at the same time on
the table in the small room in Simon Square which he shared with
Tom Smail. What is most remarkable is the run upon books of
voyages and travels, and on classic books of English literature, or
books of mere literary amusement, rather than on academic books.
Clearly there had been a great deal of previous and very
miscellaneous reading at Ecclefechan and Annan, with the already
formed result of a passion for reading, and very decided notions and
tastes as to the kinds of books that might be worth looking after. But
how, whether at Ecclefechan or in Annan, had the sedate boy been
attracted to Congreve?
At the close of Carlyle’s first college session in April 1810 he
returned to Ecclefechan. He was met on the road near the village, as
he tells us so touchingly in his Reminiscences, by his father, who had
walked out, “with a red plaid about him,” on the chance of seeing
Tom coming; and the whole of the vacation was spent by him at
home in his father’s house. It is not, therefore, till the beginning of
the session of 1810–11 that we again hear of him in Edinburgh. He
then duly matriculated for his second session, his signature again
standing in the alphabetical Arts matriculation-list immediately after
that of his namesake “Irving Carlyle” (now spelt so). His classes for
this session were the 1st Mathematical Class, under Professor John
Leslie, and the Logic Class, under Professor David Ritchie; and I
have found no note of his having gone back that year, or any other,
for a second course of Latin from Professor Christison. In the 1st
Mathematical Class, consisting of seventy students, he had again
Irving Carlyle on the benches with him; in the Logic Class, consisting
of 194 students, the same Irving Carlyle was one of his fellow-
students, and the late Earl of Wemyss was another. What he made of
the Logic Class we have not the least intimation; and it is only by
inference that we know that he must have distinguished himself in
the Mathematical Class and given evidences there of his unusual
mathematical ability. As before, however, he found variation, or
diversion, from his work for the classes by diligent reading in his
lodgings. Between Saturday the 1st December 1810 and Saturday 9th
March 1811, I find, he took from the University library the following
books in the following order:—Voyages and Travels, the 15th volume
of some collection under that name; a volume of Fielding’s works; a
volume of Smollett; Reid’s Inquiry into the Human Mind; a book
called Scotland Described; two more volumes of Fielding’s works;
Locke’s Essay in folio; another volume of Fielding; a volume of
Anacharsis, i.e., of an English Translation of the Abbé Barthélémy’s
Travels of Anacharsis the Younger in Greece during the middle of the
Fourth Century before the Christian Era; and a volume of some
translation of Don Quixote. His choice of books, it will be seen, is still
very independent. Reid’s Inquiry and Locke’s Essay connect
themselves with the work in the Logic Class; but the other volumes
were evidently for mere amusement. Whether it was still in the
lodging in Simon Square, and with Smail for his chum, that these
books were read, is uncertain. His comradeship with Smail
continued, indeed, he tells us, over two sessions; but the lodging may
have been changed. It was still, doubtless, somewhere near the
University.
For the session of 1811–12 the Matriculation Book is not
alphabetically in Faculties, but general or mixed for the three
Faculties of Arts, Law, and Medicine. There were 1475 students for
those three Faculties conjointly; and “Thomas Carlyle, Ecclefechan,”
appears among them, his matriculation number being 966. That
session, his third at the University, he attended the 2d Greek Class,
under Dunbar, the 2d Mathematical Class, under Leslie, and the
Moral Philosophy Class, under Dr. Thomas Brown. In the Greek
Class, which consisted of 189 students, he had among his class-
fellows the late venerable Sir Robert Christison, Sir Robert’s twin-
brother, Alexander Christison, the late Earl of Wemyss again, his
brother, the Honourable Walter Charteris, a Thomas Murray from
Kirkcudbrightshire, afterwards a well-known citizen of Edinburgh,
the inextinguishable Irving Carlyle, and an Andrew Combe, whom I
identify with the subsequently well-known Dr. Andrew Combe, the
brother of George Combe the phrenologist. In the Mathematical
Class, which numbered forty-six, there were several Dumfriesshire
students besides himself; and it was in this 2d Mathematical Class, if
the tradition is correct, that Carlyle took the first prize,—another
Dumfriesshire youth, who lived in the same lodging with him, taking
the second. I have turned with most interest, in this session, to the
“List of Students attending Dr. Thomas Brown’s Class,” preserved in
the peculiarly neat, small handwriting of Dr. Brown himself. It was
the second session of Brown’s full tenure of the Professorship of
Moral Philosophy in succession to Dugald Stewart, and the fame of
his lectures was at its highest. The class consisted of 151 students;
and among them, besides Carlyle and his inseparable Irving Carlyle,
and a Robert Mitchell and a Paulus Aemilius Irving, both from
Dumfriesshire, there were Duncan McNeill, afterwards Lord
Colonsay, his brother, John McNeill, Sir Andrew Agnew, David
Welsh, afterwards Dr. David Welsh and Professor of Church History,
and a James Bisset from Aberdeenshire, whom I identify with the
late Rev. Dr. Bisset of Bourtie. Some of these were outsiders, already
in the Divinity or Law Classes, who had returned to the Moral
Philosophy Class for the benefit of Dr. Brown’s brilliant lectures,—
notably young David Welsh, who had already attended the class for
two sessions, but was full of enthusiasm for Brown, whose
biographer and editor he was to be in time. Carlyle, I am sorry to say,
was not one of the admirers of the brilliant Brown. Over and over
again I have heard him speak of Brown, and always with mimicry
and contempt, as “a finical man they called Brown, or sometimes
Missy Brown, that used to spout poetry.” This can hardly have been
out of disregard for metaphysics as such, for he had much respect for
Dugald Stewart, the then retired professor. The dislike seems to have
been partly personal, partly to the new kind of highly ingenious
metaphysics which Brown was trying to substitute for the older and
more orthodox Scottish Philosophy of Reid and Stewart. At all
events, it is worthy of note that those brilliant lectures of Thomas
Brown, which James Mill and John Stuart Mill admired so much in
their published form, regarding them as an introduction to much
that is best in modern British Philosophy, had no effect, in their
actual delivery, on the hard-headed young Carlyle, but fell upon him
as mere dazzle and moonshine.
As Carlyle tells us incidentally that he was in Edinburgh in the
summer of 1812, it is to be supposed that he spent less of that
vacation than usual in his Dumfriesshire home. I find also that he
matriculated rather late in our books for the session of 1812–13, his
name not appearing in the first or main matriculation list, but only in
a supplementary list, and then as “Thomas Carlyle, Hoddam,
Dumfriesshire.” His father had by that time given up his trade of
mason, and had left Ecclefechan to try a small farm in the
neighbourhood. The number of students matriculated that year in
the three faculties of Arts, Law, and Medicine, was 1503; and
Carlyle’s matriculation number was 1403. The classes in which he
was enrolled for that session, his fourth and last in Arts, were Leslie’s
2d Mathematical Class (attended a second time, we may suppose, for
such higher instruction as might be fit for very advanced students),
and the Natural Philosophy Class, under Professor John Playfair. In
this last session, accordingly, as a student only of Mathematics and
Physics, with no distraction towards either Classics or Mental
Philosophy, Carlyle may be said to have been in his element. He
worked very hard in both classes, and distinguished himself in both.
My own impression, from talks with him on the subject, is that he
was, by acknowledgment of professors and fellow-students, easily
supreme in both. Leslie’s second class that year numbered but forty-
one students, and it was natural that his most distinguished student
in two previous sessions should now be familiar with him and receive
his especial notice. Certain it is that of all the Professors of
Edinburgh University in Carlyle’s time Leslie was the only one of
whom he spoke always with something of real gratitude and
affection. The affection was mixed, indeed, with a kind of laughing
remembrance of Leslie’s odd, corpulent figure, and odd rough ways;
and he would describe with particular gusto the occasional effects of
Leslie’s persistent habit of using hair-dyes, as when a streak of pink
or green would be observable amid the dark-brown or black on those
less accessible parts of his head where the chemicals had been too
liberally or too rashly applied. But he had a real esteem for Leslie’s
great abilities, and remembered him as a man to whose
mathematical instructions, and to whose private kindness, he owed
much.——A greater Hero with him in Pure Mathematics than even
Leslie, I may mention parenthetically, was the now totally-forgotten
John West, who had been assistant-teacher of Mathematics in the
University of St. Andrews for some time from about 1780 onwards,
and of whom Leslie, Ivory, and all the other ablest mathematicians
sent forth from that University, had been pupils. Of this man, whom
he knew of only by tradition, but whom he regarded as, after Robert
Simson of Glasgow, the most original geometrical genius there had
been in Scotland, I have heard him talk I know not how often. He
would sketch West’s life, from the time of his hard and little-
appreciated labours at St. Andrews to his death in the West Indies,
whither he had emigrated in despair for some chaplaincy or the like;
he would avow his belief that Leslie had derived some of his best
ideas from that poor man; and he expressed pleasure at finding I
knew something of West independently, and had a copy of West’s
rare Elements of Mathematics, published in 1784. That book,
obsolete now, was, I have no doubt, a manual with Carlyle while he
was studying Mathematics in Edinburgh University, as I chance to
know it had been with Dr. Chalmers at St. Andrews in his earlier
mathematical days.——Of Leslie’s colleague, the celebrated Playfair,
formerly in the Mathematical Chair, but since 1805 in that of Natural
Philosophy, Carlyle had a less affectionate recollection personally
than of Leslie. Sharing, I believe, the common opinion of Playfair’s
great merits, and minutely acquainted with the facts of his life, as
indeed he was with the biographies of all persons of any mark with
whom he had come into contact, he rather resented a piece of
injustice which he thought Playfair had done to himself. There were
131 students in the Natural Philosophy Class in 1812–13; and Carlyle,
as he assured me, was single in that whole number for having
performed and given in every one of all the prescribed exercises,
mathematical or other. Another Dumfriesshire student, who came
next to him, had failed in one, and that the most difficult. Naturally,
at the end of the session, he expected that his certificate would
correspond to his distinction in the class; and it was of some
consequence to him that it should. But, when he called at Playfair’s
house for the certificate, and it was delivered to him by a man-
servant, he was a good deal disappointed. The usual form of the
wording for a good student was to the effect that the Professor
certified that so-and-so had attended the class in such and such a
session and had “made good proficiency in his studies.” In Carlyle’s
case there was a certain deviation from this form, but only to the
effect that he had attended the class and that the Professor “had
reason to know that he had made good proficiency in his studies.” I
can remember Carlyle’s laugh as he told me of this delicate
distinction; and I have always treasured the anecdote as a lesson for
professors. They ought to be very careful not only in noting talent on
the benches before them, but also in signifying what they have
noted, if only because, as in Playfair’s case, they may be sometimes
entertaining an angel unawares, and some angels have severe
memories.
We have thus brought Carlyle to the summer of 1813, when he
had completed his Arts course in the University of Edinburgh, and
was in the eighteenth year of his age. Though qualified, according to
the present standard, for the degree of M.A., he did not take it; but in
that he was not in the least singular. In those days hardly any
Edinburgh student ever thought of taking a degree in Arts; as far as
Edinburgh University was concerned, the M.A. degree had fallen into
almost complete disuse; and not till within very recent memory has it