100% found this document useful (3 votes)
53 views55 pages

Java Pocket Guide 1st Edition Liguori Download PDF

Java

Uploaded by

tucosardoo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
53 views55 pages

Java Pocket Guide 1st Edition Liguori Download PDF

Java

Uploaded by

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

Download the full version of the ebook at

https://ebookgate.com

Java Pocket Guide 1st Edition Liguori

https://ebookgate.com/product/java-pocket-
guide-1st-edition-liguori/

Explore and download more ebook at https://ebookgate.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

SCJA Sun Certified Java Associate Study Guide Exam CX 310


019 Certification Press 1st Edition Robert Liguori

https://ebookgate.com/product/scja-sun-certified-java-associate-study-
guide-exam-cx-310-019-certification-press-1st-edition-robert-liguori/

ebookgate.com

Pocket Rough Guide Paris Rough Guide Pocket Guides Ruth


Blackmore

https://ebookgate.com/product/pocket-rough-guide-paris-rough-guide-
pocket-guides-ruth-blackmore/

ebookgate.com

Echocardiography Pocket Guide Bernard Bulwer

https://ebookgate.com/product/echocardiography-pocket-guide-bernard-
bulwer/

ebookgate.com

Pocket Guide to Knots Lindsey Philpott

https://ebookgate.com/product/pocket-guide-to-knots-lindsey-philpott/

ebookgate.com
The JavaScript Pocket Guide 1st Edition Lenny Burdette

https://ebookgate.com/product/the-javascript-pocket-guide-1st-edition-
lenny-burdette/

ebookgate.com

Pocket Guide to Radiation Oncology 1st Edition Daniel


Chamberlain

https://ebookgate.com/product/pocket-guide-to-radiation-oncology-1st-
edition-daniel-chamberlain/

ebookgate.com

Java Studio Creator Field Guide Anderson

https://ebookgate.com/product/java-studio-creator-field-guide-
anderson/

ebookgate.com

Linux Pocket Guide 2nd Edition Daniel J. Barrett

https://ebookgate.com/product/linux-pocket-guide-2nd-edition-daniel-j-
barrett/

ebookgate.com

The Nintendo Wii Pocket Guide 1st Edition Bart G. Farkas

https://ebookgate.com/product/the-nintendo-wii-pocket-guide-1st-
edition-bart-g-farkas/

ebookgate.com
www.it-ebooks.info
www.it-ebooks.info
Java ™

Pocket Guide

www.it-ebooks.info
www.it-ebooks.info
Java ™

Pocket Guide

Robert Liguori and Patricia Liguori

Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo

www.it-ebooks.info
Java™ Pocket Guide
by Robert Liguori and Patricia Liguori

Copyright © 2008 Robert Liguori and Patricia Liguori. All rights reserved.
Printed in Canada.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales
promotional use. Online editions are also available for most titles
(safari.oreilly.com). For more information, contact our corporate/
institutional sales department: (800) 998-9938 or corporate@oreilly.com.

Editor: Mike Loukides Indexer: Julie Hawks


Production Editor: Cover Designer: Karen Montgomery
Rachel Monaghan Interior Designer: David Futato
Copyeditor: Loranah Dimant Illustrator: Robert Romano
Proofreader: Rachel Monaghan

Printing History:
March 2008: First Edition.

Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are
registered trademarks of O’Reilly Media, Inc. The Pocket Guide series
designations, Java Pocket Guide, the image of a Javan tiger, and related trade
dress are trademarks of O’Reilly Media, Inc.
Java™ and all Java-based trademarks and logos are trademarks or registered
trademarks of Sun Microsystems, Inc., in the United States and other countries.
Many of the designations used by manufacturers and sellers to distinguish
their products are claimed as trademarks. Where those designations appear
in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the
designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the
publisher and authors assume no responsibility for errors or omissions, or
for damages resulting from the use of the information contained herein.

ISBN: 978-0-596-51419-8
[TM]

www.it-ebooks.info
Contents

Preface xi

Part I. Language

Chapter 1: Naming Conventions 3


Class Names 3
Interface Names 3
Method Names 3
Instance and Static Variable Names 4
Parameter and Local Variables Names 4
Generic Type Parameter Names 4
Constant Names 5
Enumeration Names 5
Package Names 5
Acronyms 5

Chapter 2: Lexical Elements 6


Unicode and ASCII 6
Comments 8
Keywords 9
Identifiers 10

www.it-ebooks.info
Separators 10
Operators 10
Literals 12
Escape Sequences 15
Unicode Currency Symbols 15

Chapter 3: Fundamental Types 17


Primitive Types 17
Literals for Primitive Types 18
Floating-Point Entities 20
Numeric Promotion of Primitive Types 21
Wrapper Classes 23
Autoboxing and Unboxing 24

Chapter 4: Reference Types 26


Comparing Reference Types to Primitive Types 26
Default Values 27
Conversion of Reference Types 28
Converting Between Primitives and Reference Types 29
Passing Reference Types into Methods 30
Comparing Reference Types 31
Copying Reference Types 33
Memory Allocation and Garbage Collection of
Reference Types 35

Chapter 5: Object-Oriented Programming 36


Classes and Objects 36
Variable Length Argument Lists 42
Abstract Classes and Abstract Methods 43

vi | Contents

www.it-ebooks.info
Static Data Members, Static Methods, and Static Constants 44
Interfaces 46
Enumerations 46
Annotations Types 47

Chapter 6: Statements and Blocks 50


Expression Statements 50
Empty Statement 51
Blocks 51
Conditional Statements 51
Iteration Statements 53
Transfer of Control 54
Synchronized Statement 56
Assert Statement 56
Exception Handling Statements 57

Chapter 7: Exception Handling 58


The Exception Hierarchy 58
Checked/Unchecked Exceptions and Errors 59
Common Checked/Unchecked Exceptions and Errors 60
Exception Handling Keywords 62
The Exception Handling Process 65
Defining Your Own Exception Class 66
Printing Information About Exceptions 66

Chapter 8: Java Modifiers 69


Access Modifiers 70
Other (Non-Access) Modifiers 71

Contents | vii

www.it-ebooks.info
Part II. Platform

Chapter 9: Java Platform, SE 75


Common Java SE API Libraries 75

Chapter 10: Development Basics 87


Java Runtime Environment 87
Java Development Kit 87
Java Program Structure 88
Command-Line Tools 90
Classpath 96

Chapter 11: Basic Input and Output 97


Standard Streams in, out, and err 97
Class Hierarchy for Basic Input and Output 98
File Reading and Writing 99
Socket Reading and Writing 101
Serialization 103
Zipping and Unzipping Files 104
File and Directory Handling 105

Chapter 12: Java Collections Framework 107


The Collection Interface 107
Implementations 107
Collection Framework Methods 109
Collections Class Algorithms 109
Algorithm Efficiencies 110
Comparator Interface 112

viii | Contents

www.it-ebooks.info
Chapter 13: Generics Framework 114
Generic Classes and Interfaces 114
Constructors with Generics 115
Substitution Principle 115
Type Parameters, Wildcards, and Bounds 116
The Get and Put Principle 117
Generic Specialization 118
Generic Methods in Raw Types 119

Chapter 14: Concurrency 120


Creating Threads 120
Thread States 121
Thread Priorities 122
Common Methods 122
Synchronization 123
Concurrent Utilities 125

Chapter 15: Memory Management 129


Garbage Collectors 129
Memory Management Tools 131
Command-Line Options 132
Resizing the JVM Heap 134
Interfacing with the GC 134

Chapter 16: The Java Scripting API 136


Scripting Languages 136
Script Engine Implementations 136
Setting Up Scripting Languages and Engines 138

Contents | ix

www.it-ebooks.info
Chapter 17: Third-Party Tools 142
Development Tools 142
Libraries 144
IDEs 144
Web Application Platforms 145
Scripting Languages 147

Chapter 18: UML Basics 149


Class Diagrams 149
Object Diagrams 151
Graphical Icon Representation 152
Connectors 153
Multiplicity Indicators 153
Role Names 154
Class Relationships 154
Sequence Diagrams 156

Index 159

x | Contents

www.it-ebooks.info
Chapter 1

Preface

Designed to be your companion in the office, in the lab, or


even on the road, this pocket guide provides a quick refer-
ence to the standard features of the Java™ programming lan-
guage and its platform.
This pocket guide provides you with the information you will
need while developing or debugging your Java programs,
including helpful programming examples, tables, figures, and
lists.
It also contains supplemental information about things such
as the new Java Scripting API, third-party tools, and the
basics of the Unified Modeling Language (UML).
Coverage is provided through the Java 6 Platform.

Book Structure
This book is broken into two sections: language and plat-
form. Chapters 1 through 8 detail the Java programming lan-
guage as derived from the Java Language Specification (JLS).
Chapters 9 though 18 detail Java platform components and
related topics.

xi

www.it-ebooks.info
Font Conventions
Italic
Denotes filenames, file extensions (such as .java), and
directory paths.
Constant width
Denotes class names, types, methods, data members,
commands, properties, and values.
Constant width italic
Indicates user-supplied values.

Comments and Questions


Please address comments and questions concerning this
book to the publisher:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (Fax)
There is a web page for this book, which lists errata, examples,
or any additional information. You can access this page at:
http://www.oreilly.com/catalog/9780596514198
To comment or ask technical questions about this book,
send email to:
bookquestions@oreilly.com
For information about books, conferences, Resource Cen-
ters, and the O’Reilly Network, see the O’Reilly web site at:
http://www.oreilly.com

xii | Preface

www.it-ebooks.info
Authors
Robert Liguori is a Senior Software Engineer for Management,
Engineering and Technology Associates, Inc. Patricia Liguori is
a Lead Information Systems Engineer for The MITRE Corpora-
tion. The authors may be contacted in regards to comments,
questions, or errata found in this book at jpg@gliesian.com.

Safari® Books Online


When you see a Safari® Books Online
icon on the cover of your favorite technol-
ogy book, that means the book is avail-
able online through the O’Reilly Network
Safari Bookshelf.
Safari offers a solution that’s better than e-books. It’s a vir-
tual library that lets you easily search thousands of top tech
books, cut and paste code samples, download chapters, and
find quick answers when you need the most accurate, cur-
rent information. Try it for free at http://safari.oreilly.com.

Acknowledgments
We extend a special thank you to our editor, Mike Loukides.
His Java prowess, responsiveness, and ongoing collaboration
have made writing this book an enjoyable experience.
Appreciation goes out to our technical reviewers and sup-
porters: Mary-Ann Boyce, Kelly Connolly, Edward Finegan,
David Flanagan, David King, Chris Magrin, Confesor Santi-
ago, Wayne Smith, Martin Suech, and our families.

Dedication
This book is dedicated to our daughter, Ashleigh.

Preface | xiii

www.it-ebooks.info
www.it-ebooks.info
PART I
I. Language

www.it-ebooks.info
www.it-ebooks.info
CHAPTER 1

Naming Conventions

Naming conventions are used to make Java programs more


readable. It is important to use meaningful and unambiguous
names comprised of ASCII letters.

Class Names
Class names should be nouns, as they represent “things” or
“objects.” They should be mixed case with only the first let-
ter of each word capitalized.
public class Fish {...}

Interface Names
Interface names should be adjectives. They should end with
“able” or “ible” whenever the interface provides a capability;
otherwise, they should be nouns. Interface names follow the
same capitalization convention as class names.
public interface Serializable {...}
public interface SystemPanel {...}

Method Names
Method names should contain a verb, as they are used to
make an object take action. They should be mixed case,
beginning with a lowercase letter, and the first letter of each

www.it-ebooks.info
internal word should be capitalized. Adjectives and nouns
may be included in method names.
public void locate( ) {...} // verb
public String getWayPoint( ) {...} // verb and noun

Instance and Static Variable Names


Instance variable names should be nouns and should follow
the same capitalization convention as method names.
private String wayPoint;

Parameter and Local Variables Names


Parameter and local variable names should be descriptive
lowercase single words, acronyms, or abbreviations. If multi-
ple words are necessary, they should follow the same capital-
ization convention as method names.
public void printHotSpot(String spot) {
String bestSpot = spot;
System.out.print("Fish here: " + bestSpot);
}

Temporary variable names may be single letters such as i, j,


k, m, and n for integers and c, d, and e for characters.

Generic Type Parameter Names


Generic type parameter names should be uppercase single
letters. The letter T for type is typically recommended.
The Collections Framework makes extensive use of generics.
E is used for collection elements, S is used for service loaders,
and K and V are used for map keys and values.
public interface Map <K,V> {
V put(K key, V value);
}

4 | Chapter 1: Naming Conventions

www.it-ebooks.info
Another random document with
no related content on Scribd:
His Excellency D. Petkoff,
Prime Minister of Bulgaria.

Lady Buchanan, wife of Sir George Buchanan, the British Minister,


is the principal hostess, and with her daughter is foremost in Sofia
society. Until ill-health prevented her recently, she was an ardent
player of hockey and tennis, and constantly in the saddle. Her
entertainments are always brilliant, and in her pretty salon one
meets everyone who is anyone in Sofia.
Again, the Military Club is another centre of social life. The
building is a handsome one, with an extremely fine ballroom, where
dances, given every week through the season, are attended by the
elite of Sofia. I went to one, and found it a particularly gay and
brilliant function.
Government institutions in Sofia amazed me. They would do credit
to any European capital. The Agricultural Bank, the inner working of
which I was permitted by Monsieur N. Ghenadieff, Minister of
Commerce, to inspect, is a fine new building of huge dimensions,
with a beautifully ornamented board-room, and its operations no
doubt tend much towards securing the public prosperity of Bulgaria.
M. Seraphimoff, the Governor, who conducted me round, told me
that the bank had its origin in the time of the Turkish rule. As far
back as 1863, the Governor of the vilayet of the Danube created
small banks in order to aid the peasants, the villagers repaying their
loans in crops and the banks selling the produce.
During the Russo-Turkish War, however, many of these banks lost
their capital, for the Turkish functionaries escaped with all the funds
they could place their hands upon. The Provisional Russian
Government re-established the banks, and they have continued to
progress until the present institution was founded. It now has
eighty-five branch offices in the principal towns and agents in most
of the villages. Its direction is under a governor and four directors
nominated by Prince Ferdinand. The operations of the institution are
as follows: to accept deposits; to grant loans on mortgages or
securities; to grant loans upon cattle and agricultural produce; to
advance money to the peasants for the purchase of cattle, seeds, or
agricultural implements; to make personal loans; to open current
accounts with peasants; to buy agricultural implements, seeds, and
machinery for the peasants; to accept loans for departments or
communes; and for the transfer of securities. The interest charged
or given is 5 per cent. for deposits for five years, 4 per cent. for
three years, and 3 per cent. for one year. In 1901 the amount of the
bank’s operations was 535,575,182 francs, while in 1905 it
amounted to 1,180,778,378 francs, thus showing how greatly it is
appreciated by the peasant, and of what enormous benefit it is to
the country.
While there, I saw many uncouth peasants in their sheepskins
from far-distant villages come and obtain loans, repay their interest,
or make petition for their inability to pay. It is very apparent that all
of them greatly appreciate the fact that the Government is their
creditor and not the Jews.
Another institution which I inspected was the State printing press,
a fine building containing the latest machinery; and afterwards I was
shown the building of the magnificent new church of St. Alexander
Newsky, which, being constructed in blocks of white stone just
behind the old church of St. Sophia, is costing over three million
francs, and is to be in memory of the Russian liberator of Bulgaria.
Truly, everywhere one turns in Sofia one sees some new buildings,
for signs of rapid progress and up-to-dateness are on every hand.
Bulgaria, with Servia, is surely destined to expand in the near
future, and the “big Bulgaria” must some day ere long be an
accomplished fact.
The Royal Palace: Sofia.
The Main Boulevard: Sofia.
CHAPTER II
BULGARIA AS A FIELD FOR BRITISH
ENTERPRISE
Audiences of members of the Bulgarian Cabinet—Dr. Dimitri Stancioff, Minister for
Foreign Affairs, the coming man of Bulgaria—His policy—Facts about the
mineral wealth and mining laws—Advice to traders and capitalists by the
British Vice-Consul in Sofia—Our methods as compared with those of other
nations.

One of the objects of my observations being to point out where


British capital can, with advantage and security, be employed in the
Balkans, I made, while in Sofia, very careful and exhaustive inquiry.
Information was given me by the late Premier, M. D. Petkoff; the
new Minister of Foreign Affairs, Dr. Dimitri Stancioff; and by M.
Ghenadieff, the Minister of Commerce, who was also interesting
himself very actively in the Balkan Exhibition at Earl’s Court. To these
three members of the Bulgarian Cabinet, and to His Royal Highness
Prince Ferdinand himself, I have to acknowledge my thanks for
placing all information at my disposal. The Minister for Foreign
Affairs deputed his cousin, Monsieur D. M. Stancioff, of the
Commercial Department of the Ministry, to accompany me
everywhere and explain everything. I was given a perfectly free
hand to go when and where I liked, and, as His Excellency put it, “to
see Bulgaria just as I pleased.”
The Bulgarians are nothing if not thoroughly businesslike. I was
particularly requested by the Ministers not to paint the country in
couleur de rose. One member of the Cabinet said, as I stood in the
corner of the ballroom of the Military Club one night, “We would like
the English to know exactly what they can find in Bulgaria, and how
we shall treat them. Don’t flatter us, and cause English capitalists to
expect too much. We have good paying investments for them—if
they will only come here.”
I took a good deal of trouble in going very minutely into this very
important question, and found the Government ready and eager to
give every facility to British capitalists to exploit the great mineral
wealth in their country. The mining laws are just, and extremely
favourable to secure absolute rights to those who invest. The
Government have established in Sofia a Mining Department under
the Ministry of Commerce, where specimens of ore may be seen,
and where every information can be obtained. By the courtesy of M.
T. Michailowsky, the able Director of this Department, I was afforded
an opportunity of inspecting the various collections, and was given
much information of intense interest.
It seems that up to the present time the Government have given
thirty-one concessions, mostly to French, Russian, Belgian, and
Italian capitalists. Of these, sixteen are for coal, four for copper, two
for manganese, two for iron, two for lead, two for zinc, and one for
oil-bearing minerals. There are no English companies in Bulgaria at
present, but I was informed by the Minister of Commerce that the
greatest attention would be paid to any serious application from
England. There are known to exist in the district of Bourgas, on the
Black Sea, very rich copper deposits, also in the Vraza district, and in
Belogradjik, near the Danube.
Two kinds of “permits for research” are granted by the
Government. The first—a general one to search in any part of
Bulgaria—is given free, but with a personal guarantee that any
damage done will be made good. The second is a permit for a
special place, which must not be of greater extent than 8,000,000
square metres, and for this is charged eighty francs. This lasts for
two years. After this time, if a concession is desired, the Department
make inquiries in order to see if the proposed mine bears sufficient
to justify its working. This having been decided—which takes about
a month, or at most two—the Prince issues a decree, and the
concession is granted for ever. No deposit is required, but the
Government takes, for each hectare, three francs per annum for
coals, and four francs per annum for minerals. They also tax the
output at the rate of one per cent. Machinery and material enter the
country free of duty, and as far as I was able to judge, the
Bulgarians make excellent workmen, being very sober, industrious,
and obedient. At present, however, there is large emigration, for
there is not sufficient work for the four and a half millions of people
in the country.

His Excellency N. Ghenadieff, Bulgarian


Minister of Commerce.

One colliery is worked by the Government at Pernik, and this


supplies the railways, the city of Sofia, and the many industrial
enterprises with about 200,000 tons of excellent coal yearly. All the
other mines are just starting to work, and show prospects of
splendid profits.
The copper mine at Vraza, which is exploited by Monsieur
Maurocordato of Constantinople—who has invested about 600,000
francs—has, in two years, repaid itself, thus showing that there are
mines in Bulgaria, and very rich ones indeed.
All the concessions already granted show great futures, but
unfortunately, with the exception of the Vraza enterprise, the
concessionaires lack capital.
The Bulgarian Mining Law is a very liberal one, being an exception
to the laws of most other countries, for it has been drawn up
specially to induce the investment of foreign capital, as well as to
secure the interests of shareholders. The people of Bulgaria are not
rich enough to exploit their mines themselves, and for that reason
the mining industry of the country must of necessity be in the hands
of the foreigner.
When making my inquiries, M. R. S. Kossef, Director of the
Commercial Department of the Ministry of Foreign Affairs, was most
particular that I should say nothing that was not absolutely true
regarding the mines. “We do not wish to attract capitalists to
Bulgaria by means of advertisement,” he said. “We wish them to
know that they will here find a good return for their investments,
and that if they exploit our mines, we, on our part, will treat them
justly—even generously.”
Besides minerals, Bulgaria is extremely rich in mineral springs—the
one at Banki, seventeen kilometres from Sofia, being about to be
exploited this year, when a very handsome bath establishment and
hotel are to be constructed. The source is situated in the valley
beneath the Lubin mountain, and an automobile service is to be
established with Sofia. This spring gives 1200 litres a minute, and
has been pronounced by a number of first-class authorities in
Germany and France to be a water almost unexcelled in Europe.
Other springs abound all over the country, and so important are
they, indeed, that the Government have issued a large coloured map
of them.
In Sofia itself, close to the old mosque, are well-known sulphur
baths. There is a project for building a bath establishment, but to do
so it would mean the pulling down of the mosque in question. The
Turks would not object so much if a new mosque could be built, but
it seems that the difficulties of construction are very great, so for the
present the matter remains in abeyance.
In the whole of Bulgaria over two hundred thermal and mineral
springs are known, and they are situated in eighty different districts.
The department of Sofia alone contains twenty-three, the warmest
being at Dolna-Banja. The more important of the others are at
Kniajevo, Gorva, Banja, and Pantcherevo. Then there are the
renowned warm springs at Verschetz, in the department of Vratza,
while in the department of Plovdiv (Philippopoli) there are more than
forty springs, the principal of them being at Hissar. This, perhaps the
most reputed in all the Orient, is situated in the valley of Tchepino,
in the centre of the Rhodopes Mountains. At Lidji, near Bourgas, and
at Sliven, there are establishments on the latest modern principle.
Another which is being actively exploited is the waters of Meritchteri,
in Stara-Zagora, which are declared by analysts to be quite equal to
those of Carlsbad, and which are believed to have a great future
before them. Dr. Ernst Hintz, of Wiesbaden, has written a book upon
these particular waters, and has given exhaustive analyses.
Early Morning in Sofia.
On the road to the Shipka.

There are also minor waters in the town of Kustendil and in


dozens of other villages and towns all over Bulgaria.
Again, to encourage intending pioneers of new branches of
industry, it is interesting to note that the industries in actual
existence are making great progress. The numerous spinning mills
and cloth factories in Eastern Roumelia have been enlarged, while
the Varna Cotton Mill, whose headquarters are in Manchester,
employs nearly seven hundred hands, and in 1905 paid a dividend of
10 per cent.
As regards British trade in Bulgaria, the attention of the English
manufacturer has been repeatedly drawn, in trade reports from the
Consulate in Sofia, to the energetic measures adopted by foreign
competitors to secure the Bulgarian market for themselves. As
Germany’s rivalry is by far the most formidable, it may be well to
briefly illustrate the methods by which that country is steadily
absorbing the trade of the Near East, as explained to me by Mr.
Toulmin, British Vice-Consul in Sofia. Not only do the principal
German importers have capable agents established in the more
important towns throughout Bulgaria to push the sale of their goods,
but they also send at regular intervals experienced travellers who
thoroughly investigate the commercial condition of the country in its
various trade centres, take note of the wants and requirements of
the population, and enter into direct relations with the retail trader.
They are, moreover, instructed to do business at any cost, and are
authorised to give credit for a year or even longer. By their readiness
to accept the smallest order, by scrupulously adhering to conditions
and specifications, and by strictly supplying goods according to
sample approved, German importers are now reaping the fruits of a
painstaking and methodical commercial policy, which menaces even
Austria-Hungary’s hitherto unassailed supremacy. The importance,
therefore, of sending out to Bulgaria representatives with some
knowledge of French or German cannot be too strongly impressed
on British manufacturers. It may be well to mention that a
gentleman, representing a well-known Birmingham firm dealing in
hardware, called at the Consulate at Sofia a few months ago, and
expressed himself as highly satisfied with the result of his fortnight’s
business tour in Bulgaria.
By the employment of commercial travellers, the translation of
their catalogues, if not into Bulgarian, at any rate into French or
German, the use of the metric system of weights and measures, the
conversion of sterling into francs and centimes, and by giving longer
credit—by these means only can British merchants hope to compete
successfully with their foreign rivals.
The Bulgarian Sobranje.
CHAPTER III
WILL BULGARIA DECLARE WAR?
A sitting of the Sobranje—Declarations by the Prime Minister and Dr. Stancioff—
The new Minister of Foreign Affairs—A sound progressive government—Strong
army and firm policy—Will the deplorable state of Macedonia still be
tolerated?—Ominous words.

It was a bitterly cold November evening when, accompanied by Sir


George Buchanan, I entered the Sobranje, or Bulgarian Parliament,
to hear the Ministerial statement upon the future policy of Bulgaria
and her attitude towards Turkey.
A great high-roofed square chamber, enamelled entirely in white
and picked out with gold. At one end a high, red-carpeted daïs with
the throne, behind which hung a full-length portrait of Prince
Ferdinand. Upon an escutcheon above, the Bulgarian lion on a
crimson shield. Below the empty throne, a long red-covered table,
where sat the President, a short, grey-haired little man, who from
time to time rang a musical gong; and in the arena, on a scarlet
carpet, rows of horse-shoe benches half filled by deputies. On the
right, at a table placed at an angle, sat the Ministers. First was
Monsieur Petkoff, the Prime Minister, the most prominent man in
Bulgaria, and who has, alas! since shared the fate of his friend the
late Stambouloff; next Dr. Stancioff, the newly appointed Minister for
Foreign Affairs; the Minister of War in a dark blue uniform with a
white cross at his throat; and the Ministers of Justice, Commerce,
and Finance.
Above, around three sides of the huge white-and-gold hall, the
galleries were crowded by the public, while over all big arc lamps
shed their white brilliancy. With us in the diplomats’ gallery sat the
Prince’s confidential secretary, M. Dobrovitch, the German Minister,
the representatives of Turkey and Roumania, Colonel H. du Cane,
the British military attaché, and numbers of other diplomats.
The House was silent. Every ear was strained to catch the
Premier’s words, for it was he who was now speaking. A rather
short, grey-bearded figure, just past the prime, whose left hand as
he gesticulated only showed a stump. He lost it at the Shipka, and
as patriot and politician he was leader of his party—a party of
progress, that has been four years in power with an overwhelming
majority.
For the past four hours he had been speaking fluently, easily,
without interruption, forecasting the future policy of Bulgaria—the
policy which is designed to lead the country to prosperity. Bulgaria
had long waited for this, and every word was now being listened to
with rapt attention.
On those benches below sat representatives of the people, men of
every class—lawyers, shopkeepers, peasants in their white linen or
brown homespun suits, and even Turks. Surely this Sobranje is
essentially a representative gathering.
Now and then came a spontaneous outburst of applause, very
marked when the Prime Minister dwelt upon the cordial relations
with Roumania and their identical aims with regard to Macedonia.
Everyone applauded—all save one little section of benches on the
extreme left—a mere handful of men—the Opposition. So small are
they that they really do not seem to count. Nobody took any notice
of them. With their backs to the holy ikon of burnished gold and
highly finished religious pictures, they sat facing the Ministers, who
were, of course, ever confronted by the emblem of their faith.
Gen. Michael Savoff, Bulgarian Minister of War.

This speech, being in Bulgarian, was kindly translated to me by M.


Dobrovitch, the Prince’s private secretary. He said—
“To-day neither the Macedonian people nor Bulgaria nor Turkey
are the same states which they were fifteen years ago. In
consideration of the solution of the Macedonian question, we have to
reckon with several factors. The most important of them is that we
ought to be ready at a moment’s notice. We have to be strong!
Europe acts and reforms in Macedonia. No Bulgarian Government
can foresee what to expect or how the events will develop
themselves. We must try to be one of the arbitrary factors in the
solution of the Macedonian question, and therefore we must be
armed. We have no intention of annexing Macedonia, but we wish to
better the positions of our compatriots. It is in the interest of Turkey
to reform Macedonia and to shake off all exterior influence. When
even Roumania arms herself for a few countrymen, ought we not
also to arm? We are only a small nation, but in order to be safe we
ought to have a strong army. It is said that such an army would be a
luxury. That would be only the case, then, if we could not help
ourselves without assistance. It is our duty to keep an army ready,
for it is only in so doing that we shall be considered of any
consequence when the solution of the Macedonian question arrives.
A weak country is of no importance. Such a country only serves as a
toy for others.
“With regard to her culture, agriculture, and her politics, Bulgaria
is to-day in a different condition than heretofore. Though we do not
acknowledge any progress, other countries see that Bulgaria has
made in twenty years a very great progress and that she still is
developing in large strides. We possess in the Balkan Peninsula a
very important point, where many interests join. The most
important, however, is to hope and to rely on our own strength.”
Dealing with the foreign policy of Bulgaria, the Prime Minister said

“They tell us that Bulgaria has no friends. On the contrary, we
possess the friendship of all States. Our relations with other nations
are not at all the same as we found them in the beginning. No
unimportant contretemps can disturb our relations with Russia. I am
in the position to proclaim that Bulgaria possesses the sympathy of
all other nations. The fact that our commercial contract with Austria-
Hungary is not yet signed does not say that our relations with each
other are not friendly. Even the two parties of that country are not
on good terms, and they cannot decide the contract. M. Todoroff has
said that our relations to Turkey are rather strained. That is not true:
it is the most difficult thing to enter into any contracts with Turkey.
In spite of those difficulties, we have signed some smaller contracts.
It is also said that Servia has been playing with us, in not showing
us the tariff unions of the Skupshtina. Now, Servia is under pressure
from Austria-Hungary, and at the time that this proposition was
brought before the Skupshtina it could not be carried by a majority
of two votes. That was not sufficient for us. Servia began to export
her goods viâ Varna, and up to to-day no fewer than 4000 waggons
of corn have been exported viâ Varna. Is that no success for our
railways?
“Our relations with our neighbours are formed on a purely
economical basis. We mean to further our industry! But this
economical basis has nothing to do with the great and pressing
Macedonian question. We only wish to keep up friendly relations
with Roumania. We try to keep our relations with our neighbours in
order, and we count upon success. In which way shall we reach this
success? That surely is our own affair! I have finished. You see that
our policy is a policy of peace. However, remember that peace can
only be protected with arms in the hand, therefore we wish to
enlarge our army. In case we have to incur expenses for our army,
we shall ask them from you without embarrassment. You may call
that bravado on our part, but we shall still do our duty; for peace to-
day means an armed peace. Led by a policy of peace, we shall try to
keep up good relations with all the nations, and we shall do
everything possible to render assistance to our brethren in
Macedonia. We shall not court war, for that might cost us our liberty.
You think we are ready to draw our swords, you believe we want to
deliver Macedonia through a war? I tell you that we only want to
continue our former policy and walk on with courage.”
The Prime Minister, with a final wave of his maimed hand,
resumed his seat amid a loud outburst of applause from both
deputies and the general public in the long galleries of the great
white-and-gold Chamber. Only we, in the diplomats’ gallery, were
silent—with the Opposition, of course.
His Excellency L. Payacoff, Sir George Buchanan,
Bulgarian Minister of Finance. British Minister at Sofia.

Photo] [Elliott & Fry.

The sitting was a historic one in the annals of Bulgaria, and ere
the applause had died away, the President, on the red-carpeted
platform, rang his gong violently, and called upon the newly
appointed Minister of Foreign Affairs to make his declaration upon
Bulgaria’s future policy.
Dr. Stancioff, who until recently was Bulgarian diplomatic agent in
St. Petersburg, rose from his seat at the Ministers’ table—a dark,
good-looking, middle-aged man—a trifle nervous perhaps at
addressing the Chamber for the first time in his new position.
A dead silence followed. Bulgaria awaited the statement with
breathless eagerness. They had heard the Premier’s declaration
regarding Macedonia. What would the Foreign Minister say?
The blue-uniformed attendants took up their positions against the
dead white panelling of the Chamber, lending the necessary colour
to complete the picturesqueness of the scene, while the great arc
lamps hissed above as they shed their bright white light over the
rows of deputies upon the horseshoe benches. On the wall, straight
before the Ministers’ table, the burnished gold of the holy ikon shone
to remind them of their duty to the Almighty and to the nation. For a
few moments all was silent.
Then Dr. Stancioff, the new man of Bulgaria, cleared his throat,
and in Bulgar made the following clear, deliberate, and concise
statement, of which the following is a translation. It is, as will be
seen, a direct pronunciation of foreign policy—a firm policy, which
may very probably mean war with Turkey at a no distant date.
Indeed, war is in the air in Bulgaria, and over the Macedonian
question may come at any moment; therefore the Minister’s actual
words may, with advantage to the future, be repeated here.
He said—
“Gentlemen, the Minister President has just given an ample
exposition of the policy the Government has followed up to the
present moment, and the course which it has marked out for itself
for the future: on this point, therefore, there is but little left for me
to say, as a member of this Government, and as one who is willing
to bear the responsibility of his acts before this honourable
Assembly.
“Under these circumstances, if I speak, it is chiefly that my silence
may not give rise to misinterpretation, and in order to underline the
words my colleague has said.
“Without doubt, you remember, gentlemen, that I have held the
post of Foreign Minister only a few days, and I am under no
obligation to enter into any explanation of the policy followed before
my nomination, and on the debates, interpellations, and the opinions
that it has called forth. Therefore I shall limit myself to saying a few
words on the policy that we are going to follow for the future.
“There are two questions I wish to discuss. Firstly, our relations
with the Great Powers; and secondly, what is to be our policy in
regard to what I must call the question of questions—Macedonia.
“First of all, I am glad to be able to state that our relations with
the Great Powers are of the best.
“This fact is always being confirmed by the notifications which we
receive from abroad.
“By the line of peaceful development which she has traced for
herself, and which she has never ceased to pursue, by the
honourable manner in which she fulfils all her international
engagements, and by the clear comprehension which she has of her
position in the Balkans, Bulgaria is gaining more and more the
sympathy and esteem of the Great Powers.
“It would be superfluous to mention in detail our relations with
each separate State. Nevertheless, I wish to point out the happy fact
that as to what concerns our relation with Russia—the Liberating
Power—they are what they ought to be when one considers the ties
which bind us to her, when one considers the ties which unite the
two Slav people, and when one considers all that Bulgaria owes to
Russia. Our relations with Russia are of the best, and it will always
be the Government’s endeavour to render them even more cordial.
“Economic as well as political considerations bind us to Austria-
Hungary. These interests compel us to maintain relations as cordial
as possible with this Great Power.
“Our friendship with Germany, England, France, and Italy is dear
to us. We greatly appreciate the sympathy of which these countries
have given us so many proofs, and it will be our care, guided by the
interests of our country, to consolidate and ameliorate these
relations.
“As regards our relations with the neighbouring States, I assert
that those with Roumania are, as they ought to be, the best and the
most cordial. We appreciate at its true value our sincere friendship
with Roumania, and it will be our task to preserve it.
“Our relations with Servia are good. We desire to cultivate a
neighbourly policy with this State. It is a policy suited to two sister
nations, and we shall cultivate it in accordance with the point of view
that Bulgaria has cultivated for so long. I may add that, to gain this
end, we shall do all that is in our power.
“As to our relations with Montenegro, it suffices to say that ancient
sympathies, the reciprocity of which has never been denied, bind us
to this State. Our sympathies perpetuate the nature of these
relations with our valiant sister nation, and assure us that they can
only be good and cordial.
“From a diplomatic point of view, our relations with Greece are
good and normal; the regrettable incidents which took place last
summer in certain portions of our country belong to the Department
of the Interior. They are, so to speak, a family matter; they cannot,
and must not, be allowed to darken relations between the two
countries, who in their common interests will guard against a
modification so undesirable.
“There only remains for me to speak of our relations with Turkey.
“I will be brief, though I could speak at great length upon this
subject.
“Our relations can only be good, or sincerely good. At the present
moment they are only ‘good.’ Before they can become ‘sincerely’
good it is necessary that the two countries should be convinced not
only of the utility of friendly relations, but also that their interests,
political and economic, demand other relations than those that exist
at the moment. As regards ourselves, who take this matter at its
true valuation, it will be our task to do our utmost to prove to Turkey
that we justly estimate these interests, and are prepared to pursue a
sincere policy, provided that, on her side, she gives us pledges of her
reciprocity.
“You will be able to estimate what that policy is by the attitude
that we have taken up regarding the Macedonian question. This is a
European question, but that does not hinder it from being, at the
same time, both a Bulgarian and a Turkish question. First of all, I
declare that the Bulgarian Government is far from having conceived
the idea of provoking or imposing a solution of the Macedonian
question by violent means. But our Government recognises the
significance of this vital question for our country, it justly estimates
the violence with which this question reflects itself upon the inner
life of the Principality, and this renders it necessary to closely
observe its development and its solution.
“The Macedonian question is in the hands of the Great Powers,
who have taken upon themselves the task of introducing into
Macedonia reforms assuring to the population of this country a
development at once more orderly and more free. It is true that in
this respect up to the present an altogether satisfactory result has
not yet been achieved, and that the Bulgarian population of
Macedonia and the vilayet of Adrianople still have to face
complications. But the Government hopes that the good work they
have begun will make progress. The Government will take every
measure to keep itself currently informed of the situation in
Macedonia, and will do everything in its power to at all times assist
the interested Governments, and insist with all its energy upon the
amelioration of the condition of the people of this country. The
Government think that the representation they are going to make to
the Great Powers in regard to a prompter and more energetic
carrying out of the essential reforms in Macedonia is not
incompatible with having good and cordial relations with Turkey. On
the contrary, they consider that action of this nature suggests a
more normal conception of the reciprocal interests of the two
countries, and that it will induce the Government of His Majesty the
Sultan to adopt a totally different attitude in regard to the Bulgarian
population of Macedonia—an attitude which will conduce to its
peace, and which will be, at the same time, an important factor in
the destinies of the Empire itself.
Military Manœuvres in Bulgaria.

“We make no mental reservations with regard to Turkey. We do


not dream of conquest or annexation. But the Bulgarian nation
cannot look coolly on while our blood-brothers (those of our own
blood) are being subjected to such ordeals as those they are
suffering in Turkey. In the name of reciprocity, in the name of justice
and of humanity, the Bulgarian nation demands that the right of
existence, and that the right of free development in their nationality,
and its religion, be granted to the Bulgarians of Macedonia. She
demands that their right of enjoying the fruits of their labour be
recognised.
“The Government has the strongest convictions on the subject of
the national duty, and will not waver in carrying them out. It is the
fulfilling of this duty which must constitute the foundation of friendly
relations with Turkey, and in this matter the Government will stand
firm.
“The arming of our military forces must, of necessity, be a
contradiction. We live in the era of armed peace, and we must not
lose sight of the fact that the peace of Europe is due, if not entirely,
at any rate in great part, to the formidable armament that each
country keeps up. Bulgaria, though small, cannot evade this
essential, if she wishes to live in peace.”
Dr. Stancioff resumed his seat amid thunders of applause.
Parliament shortly afterwards adjourned, and we went home to
snatch a hasty dinner and put on our war-paint for the smart ball at
the Military Club.
Will Bulgaria declare war against Turkey? That was that night, and
still is, the question on everyone’s lips in Sofia.
CHAPTER IV
THE BULGARIAN EXARCHATE AND THE PORTE
A difficult and little-understood problem—Bulgaria the “dark horse” of the
Peninsula—An explanation of the question between Bulgaria and Turkey—The
Bulgarian Church and the Imperial Firman—The present position of the
Exarchate—Europe should listen to the Bulgarian demand—Chats with
Macedonian orphans—Their terrible stories.

The question of the Bulgarian Exarchate and the Porte is of


paramount importance in Bulgaria at the present moment—a very
difficult problem which the Government have to face.
So little is it understood in England, even by those professing to
be au courant with the Balkan question, that I may perhaps be
pardoned if I endeavour to render the situation intelligible. “What
does Bulgaria want?” is the question so very often asked. What she
really wants, and what are her aims, will, I hope, be shown in the
following pages.
Bulgaria, it must always be remembered, is with Servia, the
coming mistress of the Balkans. She is the “dark horse” of the
Peninsula. Her power is admitted, but the extent of her force cannot
be gauged. One thing is certain, that the present Government being
an essentially strong one, and Dr. Stancioff, the Foreign Minister, a
man of action, Bulgaria will no longer sit still and allow her people in
Macedonia to be decimated as they now are daily.
In view of this, therefore, it will perhaps be of interest to explain
impartially at some little length the question which it is feared must,
ere long, bring Turkey and Bulgaria face to face.
Ever since the liberation of Bulgaria up to the present moment the
Bulgarian Exarchate has led a perturbed existence.
As long ago as the Russo-Turkish War it had to undergo serious
trials, the Exarch being obliged to recall the Bulgarian bishops from
the Macedonian diocese. When, after the Treaty of Berlin, he
attempted to restore them to their former sees and to complete the
organisation of the Bulgarian Church—in accordance with the
Imperial Firman of May 16, 1870—by establishing a Synod and a
Mixed Council, the Exarch received in 1883 from the Turkish Minister
of Justice the following significant answer:—
“When we determine to grant you a status in the vilayets, then
only we shall consider the matter of your administration.”
So that, after an existence of only three years, the Bulgarian
Exarchate found its right of having a status in the vilayets put in
question. This, however, did not discourage the Exarch. On the
contrary, he redoubled his efforts. Relying upon the Imperial Firman,
and assisted by the Bulgarian Government, he succeeded in winning
for the Exarchate an official status in Macedonia, insisting at the
same time on the formation of a Synod and a Mixed Council,
attached to the Exarchate.
At the present day the authority of the Exarchate in Macedonia
extends over seven dioceses, namely, Uskub, Ochrida, Debr,
Monastir, Veless, Nevrokop, and Stroumitza. In addition to these,
there are still ten bishoprics which, contrary to the Firman, remain
vacant, because the Sultan refuses to grant the indispensable berats.
During the period referred to, the Exarchate was also deprived of its
right of representation at Sketcha and Malgara (vilayet of
Adrianople), whose religious communities were suspended in 1897
by the Grand Vizier Rifaat Pasha. The Bulgarian chapel at Sketcha
remains to this day under seals placed by the Imperial authorities,
and consequently inaccessible to the spiritual needs of the Bulgarian
population in that place.
The question of the Mixed Council and the Synod still remains
open. The solution of this question is of supreme moment to the
Exarchate and to the Bulgarian Government. This is due to the
position and importance of the religious communities in the Turkish
Empire.
For the better understanding of the bearing of the issues involved,
it will be perhaps necessary to refer to the history of the Turkish
Empire and its attitude towards Bulgaria.
As is well known, instead of trying to assimilate the Christian
nations which they had conquered, the Turks always considered
themselves masters of those whom they had vanquished. Their
system of government in this respect is, of course, in perfect
agreement with the spirit of their religion. The Koran subdivides all
countries into two distinct groups: first those belonging to Islam,
and secondly those under the domination of the giaours (infidels),
with whom Islam was in a state of permanent war. The true
believers, the followers of the Prophet, were declared rulers of the
infidels. These purely theocratic principles of State organisation
form, until this day, the basis of the Ottoman Empire.
As exponents of these principles, the Osmanlis did not attempt,
after the conquest of Byzantium, to impose on their new subjects
the Turkish State institutions or civil laws. Although despised and
humiliated, the rayas continued to enjoy privileges which, in many
respects, remind one of those subsequently granted by the
capitulations to the foreign Christians. The place of the rulers of the
conquered nations was now occupied by the representatives of their
Church. As an instance, Mohammed II., conqueror of Constantinople,
conferred upon the Patriarch of Constantinople the title of Miletbashi
(Chief of the Nation), and entrusted to him the administration of the
secular and spiritual interests of his flock. These same prerogatives
were also granted to the Bulgarian Patriarchs of Tirnovo and
Ochrida, as representatives of the Bulgarian nation. The spiritual
leaders of the conquered races delegated, in their turn, part of their
attributes to their inferiors—bishops and priests.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy