Schaum S Outline of Data Structures With Java Second Edition John Hubbard Download
Schaum S Outline of Data Structures With Java Second Edition John Hubbard Download
https://ebookultra.com/download/schaum-s-outline-of-data-structures-
with-java-second-edition-john-hubbard/
https://ebookultra.com/download/schaum-s-outline-of-logic-2nd-edition-
john-nolt/
https://ebookultra.com/download/schaum-s-outline-of-beginning-
chemistry-3rd-ed-schaum-s-outline-series-3rd-edition-david-goldberg/
https://ebookultra.com/download/schaum-s-outline-of-differential-
equations-4th-edition-schaum-s-outlines-richard-bronson/
https://ebookultra.com/download/schaum-s-outline-of-italian-grammar-
schaum-s-outlines-3rd-edition-joseph-germano/
Schaum s Outline of Biology Third Edition George Fried
https://ebookultra.com/download/schaum-s-outline-of-biology-third-
edition-george-fried/
https://ebookultra.com/download/schaum-s-outline-of-calculus-5th-
edition-frank-ayres/
https://ebookultra.com/download/schaum-s-outline-of-statistics-fourth-
edition-spiegel-m-r/
https://ebookultra.com/download/schaum-s-outline-of-elementary-
algebra-3rd-ed-edition-rich/
Schaum s Outline of Data Structures with Java Second
Edition John Hubbard Digital Instant Download
Author(s): John Hubbard
ISBN(s): 9780071509930, 0071509933
Edition: 2
File Details: PDF, 7.16 MB
Year: 2007
Language: english
SCHAUM’S
OUTLINE OF
DATA
STRUCTURES
WITH JAVA
This page intentionally left blank
SCHAUM’S
OUTLINE OF
DATA
STRUCTURES
WITH JAVA
Second Edition
0-07-150993-3
The material in this eBook also appears in the print version of this title: 0-07-147698-9.
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked
name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the
trademark. Where such designations appear in this book, they have been printed with initial caps.
McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training
programs. For more information, please contact George Hoare, Special Sales, at [email protected] or (212) 904-4069.
TERMS OF USE
This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work.
Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy
of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit,
distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work
for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be termi-
nated if you fail to comply with these terms.
THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO
THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK,
INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE,
AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not war-
rant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error
free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause,
in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through
the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive,
consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the
possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in
contract, tort or otherwise.
DOI: 10.1036/0071476989
Professional
Like other Schaum’s Outlines, this book is intended to be used primarily for self study. It is
suitable as a study guide in a course on data structures using the Java programming language. In
American universities, this is typically the second course in the computer science major. The
book is also serves well as a reference on data structures and the Java Collections Framework.
The book includes more than 200 detailed examples and over 260 solved problems. The
author firmly believes that programming is learned best by practice, following a well-constructed
collection of examples with complete explanations. This book is designed to provide that
support.
This second edition is a major improvement over the original 2001 edition. Most of the
chapters have been completely rewritten. Three entirely new chapters have been added, on
object-oriented programming, linked structures, and the Java Collections Framework.
Java 6.0 is used throughout the book, with special attention to these new features of the
language:
• The Scanner class.
• The StringBuilder class.
• Formatted output, including the printf() method.
• The enhanced for loop (also called the for-each loop).
• Static imports.
• enum types.
• Variable length parameter lists.
• Autoboxing.
• Generic classes
• The Deque , ArrayDeque , EnumSet , and EnumMap classes, and the Queue interface
in the Java Collections Framework.
Source code for all the examples, solved problems, and supplementary programming
problems may be downloaded from the author’s Web site
http://www.mathcs.richmond.edu/~hubbard/books/
I wish to thank all my friends, colleagues, students, and the McGraw-Hill staff who have
helped me with the critical review of this manuscript, including Stephan Chipilov and Sheena
Walker. Special thanks to my colleague Anita Huray Hubbard for her advice, encouragement,
and supply of creative problems for this book.
JOHN R. HUBBARD
Richmond, Virginia
vii
This page intentionally left blank
For more information about this title, click here
CONTENTS
Chapter 2 Arrays 26
Properties of Arrays 26
Duplicating an Array 28
The java.util.Arrays Class 29
The Sequential Search Algorithm 30
The Binary Search Algorithm 31
ix
x CONTENTS
DATA
STRUCTURES
WITH JAVA
This page intentionally left blank
CHAPTER 1
Object-Oriented Programming
1
2 OBJECT-ORIENTED PROGRAMMING [CHAP. 1
Testing occurs at several levels. Individual classes and methods have to be tested separately,
and then their success at working together must be verified. Finally, the product as a whole is
tested against the requirements document.
One final aspect of software development that is not shown in the figure is the maintenance
process. After the software has been delivered, its developers remain obliged to maintain it with
corrected versions, service packages, and even major revisions. Any major revision itself would
follow the same life cycle steps.
OBJECT-ORIENTED DESIGN
One common approach to software design is a top-down design strategy that gradually breaks
the problem down into smaller parts. This is also called step-wise refinement. It focuses on the
functional aspects of the problem and the implementation of algorithms. This procedure-oriented
design is common in scientific programming.
In contrast, object-oriented design focuses on the data components of the software, organizing
the design around their representatives. For example, an air traffic control system might be
designed in terms of airplanes, airports, pilots, controllers, and other “objects.”
The Java programming language is particularly well-suited for implementing object-oriented
designs. All executable code in Java is organized into classes that represent objects. For this
reason, Java is regarded as an object-oriented programming language.
An object is a software unit that is produced according to a unique class specification. It is
called an instance of its class, and the process of creating it is called instantiating the class. For
example, this code instantiates the java.util.Date class:
java.util.Date today = new
java.util.Date();
The variable today is a reference to the object, as shown in
Figure 1.2. Ignoring the distinction between a reference and
the object to which it refers, we would also say today is the Figure 1.2 A Java object
name of the java.util.Date object.
A Java class consists of three kinds of members: fields, methods, and constructors. The fields
hold the data for class objects, the methods hold the statements that are executed by the objects,
and the constructors hold the code that initializes the objects’ fields.
An object-oriented design specifies the classes that will be
instantiated in the software. That design can be facilitated and
illustrated by the Unified Modeling Language (UML). In
UML, each class is represented by a rectangle with separate
parts for listing the class’s name, its fields, and its methods and
constructors.
Figure 1.3 shows a UML diagram for a Person class with
four fields (name, id, sex, and dob), a constructor, and three
methods (isAnAdult(), setDob(), and toString()). Each
of the eight class members is prefaced with a visibility symbol: Figure 1.3 A UML diagram
+ means public
# for protected
for private
(Package visibility has no UML symbol.)
Random documents with unrelated
content Scribd suggests to you:
Boswell thought meet to censure the philosopher and his work. That a
literary club which had added to its membership Edward Gibbon and Adam
Smith should thereby have lost “its select merit,” reads strangely, even as a
dictum of James Boswell.
Boswell’s personal habits remained much the same. He informed Mr.
Temple that his “promise under the solemn yew” had not been “religiously
kept.” He had lately given “his word of honour” to General Paoli that “he
would not taste fermented liquor for a year.” He adds, “I have kept the
promise now about three weeks; I was really growing a drunkard.”
At the end of April Boswell proceeded to Bath, and there joined Dr.
Johnson at the residence of the Thrales. He accompanied Dr. Johnson to
Bristol, where they inspected the church of St. Mary, Redcliff, and
discoursed on the genius and errors of Chatterton. Returning to London,
Boswell realized a project on which he had set his heart—that of bringing
together Dr. Johnson and Mr. Wilkes. On this subject he writes:—
“My desire of being acquainted with celebrated men of every description had
made me much about the same time obtain an introduction to Dr. Samuel
Johnson and to John Wilkes, Esq. Two men more different could perhaps not be
selected out of all mankind. They had even attacked one another with some
asperity in their writings; yet I lived in habits of friendship with both. I could fully
relish the excellence of each, for I have ever delighted in that intellectual
chemistry which can separate good qualities from evil in the same person.”
Boswell contrived a meeting between Dr. Johnson and Mr. Wilkes by the
exercise of considerable craft. Having been invited to meet Mr. Wilkes at
the table of Mr. Edward Dilly, he bore a message from that gentleman to
Dr. Johnson, requesting him to join the party. In conveying it he played on
the Doctor’s “spirit of contradiction.” Having repeated Mr. Dilly’s message
without reference to the other guests, the following conversation ensued:
—
Johnson: “Sir, I am obliged to Mr. Dilly; I will wait upon him.”
Boswell: “Provided, sir, I suppose, that the company which he is to have is
agreeable to you?”
Johnson: “What do you mean, sir? What do you take me for? Do you think I
am so ignorant of the world as to imagine that I am to prescribe to a gentleman
what company he is to have at his table?”
Boswell: “I beg your pardon, sir, for wishing to prevent you from meeting
people whom you might not like. Perhaps he may have some of what he calls his
patriotic friends with him.”
Johnson: “Well, sir, and what then? What care I for his patriotic friends? Poh!”
Boswell: “I should not be surprised to find Jack Wilkes there.”
Johnson: “And if Jack Wilkes should be there, what is that to me, sir? My
dear friend, let us have no more of this. I am sorry to be angry with you, but it is
treating me strangely to talk to me as if I could not meet any company whatever
occasionally.”[61]
Johnson and Wilkes met not unpleasantly, and Boswell had his triumph.
In May he returned to Edinburgh. Before leaving London he repeated to
Dr. Johnson his former promise that he would devote a portion of his time
to reading. Johnson despatched to him at Edinburgh several boxes of
books, thereby relieving his collection of supernumerary volumes, and by
placing on the books a marketable value discharging a debt which he owed
on the Hebridean journey. After an interval Boswell reported that owing to
a renewed attack of melancholy the boxes remained unopened. Johnson in
these words administered reproof:
“To hear that you have not opened your boxes of books is very offensive. The
examination and arrangement of so many volumes might have afforded you an
amusement very seasonable at present, and useful for the whole of life. I am, I
confess, very angry that you manage yourself so ill.”
On the 18th March Boswell arrived in London, and at once renewed his
intercourse with Dr. Johnson. They spent Good Friday together, Boswell
accompanying the lexicographer to morning and evening service in St.
Clement’s Church. Next evening, while taking tea with him, Boswell
severely experienced Dr. Johnson’s resentment. The narrative we present
in his own words:—
“We talked of a gentleman (Mr. Langton) who was running out his fortune in
London, and I said, ‘We must get him out of it. All his friends must quarrel with
him, and that will soon drive him away.’ Johnson: ‘Nay, sir, we’ll send you to him;
if your company does not drive a man out of his house, nothing will.’ This was a
horrible shock, for which there was no visible cause. I afterwards asked him why
he had said so harsh a thing. Johnson: ‘Because, sir, you made me angry about
the Americans.’ Boswell: ‘But why did you not take your revenge directly?’
Johnson (smiling): ‘Because, sir, I had nothing ready. A man cannot strike till he
has his weapons.’ This,” adds Boswell, “was a candid and pleasant
confession.”[64]
In August Mrs. Boswell gave birth to her third son, who was christened
James. Dr. Johnson sent suitable congratulations.
In March, 1779, Boswell again repaired to the metropolis. He spent
Good Friday with Dr. Johnson, attending him at both diets of worship in St.
Clement’s Church. Johnson, he relates, preferred silent meditation during
the interval of worship, and for his improvement handed him “Les Pensées
de Paschal,” a book which he perused with reverence. On Easter Sunday
he worshipped in St. Paul’s, and afterwards dined with Dr. Johnson.
A letter to Mr. Temple, which Boswell commenced at London on the
31st May, and finished at Newcastle on the 8th June, contains the
following passages:—
“Had you been in London last week, you would have seen your friend sadly
changed for a little. So trifling a matter as letting the nails of my great toes grow
into the flesh, particularly in one foot, produced so much pain and inflammation
and lameness and apprehension, that I was confined to bed, and my spirits sank
to dreary dejection.... I am now much better, but still unable to walk; and having
received a very wise letter from my dear, sensible, valuable wife, that although
my father is in no immediate danger, his indisposition is such that I ought to be
with him, I have resolved to set out to-morrow, being the very first day after
completing another term at the Temple.... Is it not curious that at times we are
in so happy a frame that not the least trace of former misery or vexation is left
upon the mind? But is not the contrary, too, experienced?—Gracious Author of
our being, do Thou bring us at length to steady felicity.—What a strange,
complicated scene is this life! It always strikes me that we cannot seriously,
closely, and clearly examine almost any part of it. We are at pains to bring up
children, just to give them an opportunity of struggling through cares and
fatigues; but let us hope for gleams of joy here, and a blaze hereafter.... I got
into the fly at Buckden, and had a very good journey. An agreeable young widow
nursed me, and supported my lame foot on her knee. Am I not fortunate in
having something about me that interests most people at first sight in my
favour?... You ask me about Lowth’s ‘Isaiah.’ I never once heard it mentioned till
I asked Dr. Johnson about it.... I do not think Lowth an engaging man; I sat a
good while with him this last spring. He said Dr. Johnson had great genius. I give
you this as a specimen of his talk, which seemed to me to be neither
discriminating, pointed, nor animated; yet he certainly has much curious
learning, and a good deal of critical sagacity.... I did not know Monboddo’s new
book, ‘The Metaphysics of the Ancients,’ had been advertised. I expect it will be
found to be a very wonderful performance. I think I gathered from a
conversation with him that he believes the ‘metempsychosis.’”
At the close of his letter of January he informs Mr. Temple that his
father had been ill of fever, with his pulse at ninety-five; he then begs a
loan of £200, to satisfy a demand which his father could not be informed
of. The loan was not granted, and Boswell afterwards sought repayment of
an advance made to his friend at a former period, and which remained
undischarged.
In September Boswell experienced a family loss in the death of Dr.
John Boswell, his father’s brother. Of his deceased relative he writes to Mr.
Temple that he was “a good scholar and affectionate relative,” but “had no
conduct.” He adds, “He had a strange kind of religion, but I flatter myself
he will be ere long, if he is not already in heaven.” This passage might
imply that in abandoning the Romish faith he had not abjured the doctrine
of purgatory; yet that doctrine is inconsistent with the following aspiration
contained in the same letter:—
“I comfort myself with the Christian revelation of our being in a state of
purification, and that we shall, in course of time, attain to felicity. It is delightful,
Temple, to look forward to the period when you and I shall enjoy what we now
imagine. In the meantime let us be patient, and do what we can.”
Boswell was at York on the 28th March, 1784, en route for London,
when he was informed that Parliament was dissolved. Having in a brief
note intimated to Dr. Johnson his political aspirations, he posted to
Ayrshire, to contest the county. From Johnson he received a letter
entreating him to be “scrupulous in the use of strong liquors,” as “one
night’s drunkenness might defeat the labour of forty days well employed.”
On reaching Auchinleck, Boswell learned what he might have
ascertained sooner, that Colonel Montgomerie was re-soliciting the
suffrages of the constituency. He was the successful candidate. Boswell
again proceeded southward, and on the 5th May reached London. He
dined out almost daily, frequently meeting Dr. Johnson, who though an
invalid, rejoiced in the intercourse of his friends. By his physicians Johnson
had been advised to proceed to Italy, and as the journey was delayed,
Boswell apprehended that his friend was suffering from lack of funds. He
applied to Lord Chancellor Thurlow, entreating an augmentation of
Johnson’s pension, or a special grant for the Italian journey. To the
Treasury the Chancellor presented the application, but it was not
entertained. Dr. Johnson expressed his grateful sense of Boswell’s
consideration and enterprise.
After a period of severe suffering, Dr. Johnson expired on the 13th
December, 1784. He had prepared an autobiography, but destroyed it, with
a portion of his correspondence, some weeks before his decease. He
appointed no literary executor, nor left instructions respecting a memoir.
Boswell contemplated a different result, but did not publicly complain.
From respect to Johnson’s wishes he had abstained from publishing his
Hebridean tour. He now seriously employed himself in preparing it for the
printer. As the first proof-sheet was being sent him from Mr. Baldwin’s
printing office, it happened to attract the attention of Mr. Edmund Malone,
who proceeded to read the account of Dr. Johnson’s character. He was
struck with the fidelity of the representation, and begged Mr. Baldwin to
introduce him to the writer.[73] Boswell rejoiced to cultivate the
acquaintance of one who not only belonged to Dr. Johnson’s circle, but
was himself a celebrity, as editor of Goldsmith’s works, and as a writer on
Shakespeare’s plays.[74] He visited Mr. Malone almost daily, submitting to
his revision the MS. of his work. Accompanied by a flattering dedication to
Mr. Malone, the work appeared in 1786 as a bulky octavo, bearing on the
title-page the following copious inscription:—
“The Journal of a Tour to the Hebrides, with Samuel Johnson, LL.D., by
James Boswell, Esq., containing some poetical pieces by Dr. Johnson, relative to
the Tour, and never before published: a series of his conversation, Literary
Anecdotes, and Opinions of Men and Books, with an authentick account of the
Distresses and Escape of the Grandson of King James II. in the year 1746.
Not long after writing this letter Boswell obtained his only professional
appointment; he was, through the influence of Lord Lowther, appointed
Recorder of Carlisle. The emoluments of the office were small, and as an
attendance of several weeks was required annually, the acquisition was
inconsiderable. But the wits did not permit the new Recorder to enter on his
post without ridicule. The following jeu d’esprit obtained circulation:—
“Boswell once flamed with patriot zeal,
His bow was ever bent;
How he no public wrongs can feel
Till Lowther nods assent.
At the close of the first edition of Boswell’s Tour to the Hebrides, appeared
the following advertisement:—
“Preparing for the Press, in one volume quarto,
The Life of Samuel Johnson, LL.D.
By James Boswell, Esq.
“Mr. Boswell has been collecting materials for this work for more than twenty
years, during which he was honoured with the intimate friendship of Dr. Johnson; to
whose memory he is ambitious to erect a literary monument, worthy of so great an
authour, and so excellent a man. Dr. Johnson was well informed of his design, and
obligingly communicated to him several curious particulars. With these will be
interwoven the most authentick accounts that can be obtained from those who knew
him best; many sketches of his conversation on a multiplicity of subjects, with
various persons, some of them the most eminent of the age; a great number of
letters from him at different periods, and several original pieces dictated by him to
Mr. Boswell, distinguished by that peculiar energy which marked every emanation of
his mind.”
After joining the English Bar, and establishing his headquarters in London,
Boswell rented inexpensive chambers near the law courts; but in the winter of
1788-9 he removed to a house in Queen Anne Street West, Cavendish Square.
He was joined by his two sons, and his daughter Veronica,—the sons attending
an academy in Soho. His attendants were “a butler and Scotch housekeeper,”
whom he kept “on account of their fidelity and moderate wages.”[85]
Mrs. Boswell made a trial of London, but soon returned to Auchinleck. She
disapproved her husband’s preference for the English Bar, and feared that the
fogs of London would prove injurious to her health. She had been an
asthmatic patient, and at the commencement of 1789 the complaint returned
in an aggravated form. Writing to Mr. Temple on the 5th March, Boswell
expresses himself deeply concerned about his “valuable and affectionate wife,”
but he feels that joining her in the country would destroy the completion of the
Life of Johnson, and remove him from “the great whirl of the metropolis,” from
which he hoped “in time to have a capital prize.” He had visited Ayrshire at the
close of 1788, and there prosecuted an active canvass among his supposed
friends, the parliamentary freeholders. The visit and its prospective results are
thus detailed to Mr. Temple:—
“London, 10th January, 1789.
“As to my canvass in my own county, I started in opposition to a junction between
Lord Eglintoun and Sir Adam Fergusson, who were violent opponents, and whose
coalition is as odious there as the Great One is to the nation. A few friends and real
independent gentlemen early declared for me; three other noble lords, the Earls of
Cassilis, Glencairn, and Dumfries, have lately joined and set up a nephew of the Earl
of Cassilis: a Mr. John Whitefoord, who as yet stands as I do, will, I understand,
make a bargain with this alliance. Supposing he does, the two great parties will be so
poised that I shall have it in my power to cast the balance. If they are so piqued that
either will rather give the seat to me than be beaten by the other, I may have it.
Thus I stand, and I shall be firm. Should Lord Lonsdale give me a seat he would do
well, but I have no claim upon him for it. In the matter of the regency he adds that
he had ‘almost written one of his very warm popular pamphlets in favour of the
Prince;’ but as Lord Lonsdale was ill, and he had no opportunity of learning his
sentiments, he had ‘prudently refrained.’ He accuses Pitt of ‘behaving very ill,’ in
neglecting him, and denounces Dundas ‘as a sad fellow in his private capacity.’”
Boswell returned to Ayrshire in April. Mrs. Boswell had written that she was
“wasting away,” and her physician was not hopeful of her improvement. Her
husband thus describes her condition to Mr. Temple:[86]—
“I found,” he writes, “my dear wife as ill, or rather worse than I apprehended. The
consuming hectic fever had preyed upon her incessantly during the winter and
spring, and she was miserably emaciated and weak. The physician and surgeon-
apothecary, whom she allows occasionally, though rarely, to visit her, told me fairly,
as to a man able to support with firmness what they announced, that they had no
hopes of her recovery, though she might linger they could not say how long.... No
man ever had a higher esteem or a warmer love for a wife than I have for her. You
will recollect, my Temple, how our marriage was the result of an attachment truly
romantic; yet how painful is it to me to recollect a thousand instances of inconsistent
conduct! I can justify,” he adds, “my removing to the great sphere of England upon a
principle of laudable ambition, but the frequent scenes of what I must call dissolute
conduct are inexcusable; and often and often, when she was very ill in London, have
I been indulging in festivity with Sir Joshua Reynolds, Courtenay, Malone, &c., and
have come home late and disturbed her repose.”
Two weeks after he had reached London a letter from the Auchinleck
physician informed him that Mrs. Boswell was rapidly sinking. He at once set
out for Ayrshire, accompanied by his two sons, and, as he is particular in
relating, the journey was performed in “sixty-four hours and a quarter.” On his
arrival he found that Mrs. Boswell had died four days before. In a letter to Mr.
Temple, dated 3rd July, he wrote thus:—
“I cried bitterly and upbraided myself for leaving her, for she would not have left
me. This reflection, my dear friend, will, I fear, pursue me to my grave.... I could
hardly bring myself to agree that the body should be removed, for it was still a
consolation to me to go and kneel by it, and talk to my dear, dear Peggy.... Her
funeral was remarkably well attended. There were nineteen carriages followed the
hearse, and a large body of horsemen, and the tenants of all my lands. It is not
customary in Scotland for a husband to attend a wife’s funeral, but I resolved, if I
possibly could, to do her the last honours myself; and I was able to go through it
very decently. I privately read the funeral service over her coffin in presence of my
sons, and was relieved by that ceremony a good deal. On the Sunday after Mr. Dun
delivered, almost verbatim, a few sentences which I sent him as a character of her.”
Boswell’s religious views were still unsettled. During his wife’s illness he
wrote to Mr. Temple, “What aid can my wife have from religion, except a pious
resignation to the great and good God? for indeed she is too shrewd to receive
the common topics; she is keen and penetrating.” What “the common topics”
were, belief in which Boswell regarded with contempt, he has not informed us,
and it might be hazardous to conjecture.
The dissolution of Parliament expected in the spring of 1789 did not occur,
but the representation of Ayrshire became vacant in July, owing to the
acceptance of a public office by the sitting member, Colonel Montgomerie.
Obtaining intimation of the vacancy, Boswell, four weeks a widower, hastened
from London to Ayrshire to renew his claims. There were two other candidates
—Sir Adam Fergusson and Mr. John Whitefoord. The former was chosen.
Boswell informed Mr. Temple that “he would make an admirable figure even if
he should be unsuccessful.” He stood alone!
Since his failure at the English Bar, Boswell had been most energetic in the
pursuit of patronage. He rested his hopes on Mr. Dundas and Mr. Pitt, but more
especially on Mr. Burke and Lord Lonsdale. Concerning the two former he thus
communicated with Mr. Temple in the spring of 1789. After censuring Mr.
Dundas for neglecting to promote his brother David, he proceeds:—
“As to myself, Dundas, though he pledged himself (as the modern phrase is) to
assist me in advancing in promotion, and though he last year assured me, upon his
honour, that my letter concerning the Scottish judges made no difference; yet,
except when I in a manner compelled him to dine with me last winter, he has entirely
avoided me, and I strongly suspect has given Pitt a prejudice against me. The
excellent Langton says it is disgraceful; it is utter folly in Pitt not to reward and attach
to his administration a man of my popular and pleasant talents, whose merit he has
acknowledged in a letter under his own hand. He did not answer several letters
which I wrote at intervals, requesting to wait upon him; I lately wrote to him that
such behaviour to me was certainly not generous. ‘I think it is not just, and (forgive
the freedom) I doubt if it be wise. If I do not hear from you in ten days, I shall
conclude that you are inclined to have no further communication with me; for I
assure you, sir, I am extremely unwilling to give you, or indeed myself, unnecessary
trouble.’ About two months have elapsed, and he has made no sign. How can I still
delude myself with dreams of rising in the great sphere of life.”
Mr. Burke knew Boswell’s good qualities, and had sought to befriend him.
In 1782 he recommended him for employment to General Conway,[88] though
without success. Boswell still hoped to obtain a post through his influence, and
not infrequently reminded him that he was unprovided for. To Mr. Temple, in
March, 1789, he describes Mr. Burke in these terms:—
“I cannot help thinking with you that Pitt is the ablest and most useful minister of
any of those whom we know; yet I am not sure that after the pericula which should
give caution, others (and amongst them Burke, whom I visited yesterday, and found
as ably philosophical in political disquisition as ever) might not do as well; and if he
has treated me unjustly in his stewardship for the public, and behaved with
ungrateful insolence to my patron,[89] who first introduced him into public life, may I
not warrantably arraign many articles, and great ones too, in his conduct which I can
attack with forcible energy? At present I keep myself quiet, and wait till we see how
things will turn out.”
Your last letter supposes too truly my situation. With grief continually at my heart,
I have been endeavouring to seek relief in dissipation and in wine, so that my life for
some time past has been unworthy of myself, of you, and of all that is valuable in my
character and connections. For a week past, as the common phrase is, ‘I have taken
up,’ and by a more regular and quiet course find myself, I think, rather better.”
Writing to Mr. Temple on the 8th February, 1790, Boswell thus reports
progress:—
“I am within a short walk of Mr. Malone, who revises my ‘Life of Johnson’ with me.
We have not yet gone over quite a half of it, but it is at last fairly in the press. I
intended to have printed it upon what is called an English letter, which would have
made it look better; but upon calculation it would have made two quarto volumes,
and two quarto volumes for one life would have appeared exorbitant, though in truth
it is a view of much of the literature, and many of the literary men of Great Britain
for more than half a century. I have therefore taken a smaller type, called Pica, and
even upon that I am afraid its bulk will be very large. It is curious to observe how a
printer calculates; he arranges a number of pages, and the words in them at
different parts of the ‘copy’ (as the MS. is called), and so finds the number of words.
Mine here are four hundred and one thousand six hundred. Does not this frighten
you. By printing a page the number of words it holds is discovered; and by dividing
the sum-total of words by that number we get the number of pages. Mine will be
eight hundred. I think it will be, without exception, the most entertaining book you
ever read. I cannot be done with printing before the end of August.”
On the 13th October Boswell informed Mr. Temple that on lately visiting
Lowther Castle he received back his wig. “The way in which it was lost,” he
adds, “will remain as secret as the author of Junius.”
Mr. Temple became urgent for repayment of a loan of £200, and in
obtaining the necessary means Boswell severely taxed his resources. Referring
to the debt, he assured his correspondent that he had, after deducting family
costs, a free income of not more than £350, and that while he had been in
straitened circumstances for twenty years, he dreaded that his
embarrassments would continue. In a letter dated 28th November he returns
to his pecuniary difficulties.
“The state of my affairs is very disagreeable; but be not afraid of your £200, as
you may depend upon its being repaid. My rent-roll is above £1,600; but deducting
annuities, interest of debts, and expenses absolutely necessary at Auchinleck, I have
but about £850 to spend. I reckon my five children at £500 a year. You see what
remains for myself.”... “I am this year to make one trial of the Lord Chancellor. In
short, I cast about everywhere. I do not see the smallest opening in Westminster
Hall; but I like the scene, though I have attended only one day this last term, being
eager to get my ‘Life of Johnson’ finished. And the delusion that practice may come
at any time (which is certainly true) still possesses me.” He adds, “I have given up
my house, and taken good chambers in the Inner Temple, to have the appearance of
a lawyer. O Temple! Temple! is this realizing any of the towering hopes which have so
often been the subject of our conversation and letters? Yet I live much with a great
man, who, upon any day that his fancy shall be so inclined, may obtain for me an
office which would make me independent.”
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.
ebookultra.com