0% found this document useful (0 votes)
83 views54 pages

(Ebook PDF) Introduction To Java Programming, Brief Version, Global Edition 11th Edition Download

The document provides information about various editions of Java programming eBooks available for download, including the 'Introduction to Java Programming' and 'Java How to Program' series. It outlines the structure of the books, which cover fundamental programming concepts, object-oriented programming, and GUI programming using JavaFX. Additionally, it mentions supplementary resources and tools for students and instructors to enhance their learning and teaching experience.

Uploaded by

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

(Ebook PDF) Introduction To Java Programming, Brief Version, Global Edition 11th Edition Download

The document provides information about various editions of Java programming eBooks available for download, including the 'Introduction to Java Programming' and 'Java How to Program' series. It outlines the structure of the books, which cover fundamental programming concepts, object-oriented programming, and GUI programming using JavaFX. Additionally, it mentions supplementary resources and tools for students and instructors to enhance their learning and teaching experience.

Uploaded by

kyrenyokomul
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/ 54

(eBook PDF) Introduction to Java Programming,

Brief Version, Global Edition 11th Edition


download

https://ebooksecure.com/product/ebook-pdf-introduction-to-java-
programming-brief-version-global-edition-11th-edition/

Download full version ebook from https://ebooksecure.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebooksecure.com
to discover even more!

(eBook PDF) Introduction to Java Programming and Data


Structures, Comprehensive Version, 11th Global Edition

http://ebooksecure.com/product/ebook-pdf-introduction-to-java-
programming-and-data-structures-comprehensive-version-11th-
global-edition/

Introduction to Java Programming, Comprehensive Version


10th edition- eBook PDF

https://ebooksecure.com/download/introduction-to-java-
programming-comprehensive-version-ebook-pdf/

(eBook PDF) Introduction to JAVA Programming and Data


Structures Comprehensive Version 11

http://ebooksecure.com/product/ebook-pdf-introduction-to-java-
programming-and-data-structures-comprehensive-version-11/

(eBook PDF) Java: An Introduction to Problem Solving


and Programming 7th Edition

http://ebooksecure.com/product/ebook-pdf-java-an-introduction-to-
problem-solving-and-programming-7th-edition/
(eBook PDF) Java: An Introduction to Problem Solving
and Programming 8th Edition

http://ebooksecure.com/product/ebook-pdf-java-an-introduction-to-
problem-solving-and-programming-8th-edition/

(eBook PDF) Introduction to Programming with Java: A


Problem Solving Approach 3rd Edition

http://ebooksecure.com/product/ebook-pdf-introduction-to-
programming-with-java-a-problem-solving-approach-3rd-edition/

(eBook PDF) Java How to Program, Late Objects Global


Edition 11th Edition

http://ebooksecure.com/product/ebook-pdf-java-how-to-program-
late-objects-global-edition-11th-edition/

(eBook PDF) Calculus with Applications, Brief Version


11th Edition

http://ebooksecure.com/product/ebook-pdf-calculus-with-
applications-brief-version-11th-edition/

Theatre, Brief Version 11th Edition Robert Cohen -


eBook PDF

https://ebooksecure.com/download/theatre-brief-version-ebook-pdf/
6 Preface
Part I: Fundamentals of Part II: Object-Oriented Part III: GUI Programming
Programming Programming
Chapter 1 Introduction to Chapter 9 Objects and Classes Chapter 14 JavaFX Basics
Computers, Programs, and
Java
Chapter 10 Thinking in Objects Chapter 15 Event-Driven
Programming and
Chapter 2 Elementary Animations
Chapter 11 Inheritance and
Programming
Polymorphism
Chapter 16 JavaFX Controls
Chapter 3 Selections and Multimedia
Chapter 12 Exception
Handling and Text I/O
Chapter 4 Mathematical
Functions, Characters, Chapter 13 Abstract Classes
and Strings and Interfaces

Chapter 5 Loops Chapter 17 Binary I/O

Chapter 6 Methods

Chapter 7 Single-Dimensional
Arrays

Chapter 8 Multidimensional
Arrays

Chapter 18 Recursion

Organization of the Book


The chapters in this brief version can be grouped into three parts that, taken together, form a
solid introduction to Java programming. Because knowledge is cumulative, the early chapters
provide the conceptual basis for understanding programming and guide students through simple
examples and exercises; subsequent chapters progressively present Java programming in detail,
culminating with the development of comprehensive Java applications. The appendixes contain
a mixed bag of topics, including an introduction to number systems, bitwise operations, regular
expressions, and enumerated types.

Part I: Fundamentals of Programming (Chapters 1–8, 18)


The first part of the book is a stepping stone, preparing you to embark on the journey of learning
Java. You will begin to learn about Java (Chapter 1) and fundamental programming t­echniques
with primitive data types, variables, constants, assignments, expressions, and operators (Chapter
2), selection statements (Chapter 3), mathematical functions, characters, and strings (Chapter 4),
loops (Chapter 5), methods (Chapter 6), and arrays (Chapters 7–8). After Chapter 7, you can jump
to Chapter 18 to learn how to write recursive methods for solving inherently recursive problems.

Part II: Object-Oriented Programming (Chapters 9–13, and 17)


This part introduces object-oriented programming. Java is an object-oriented programming
language that uses abstraction, encapsulation, inheritance, and polymorphism to provide
Preface  7
great flexibility, modularity, and reusability in developing software. You will learn program-
ming with objects and classes (Chapters 9–10), class inheritance (Chapter 11), polymorphism
(­Chapter 11), exception handling (Chapter 12), abstract classes (Chapter 13), and interfaces
(Chapter 13). Text I/O is introduced in Chapter 12 and binary I/O is discussed in Chapter 17.

Part III: GUI Programming (Chapters 14–16)


JavaFX is a new framework for developing Java GUI programs. It is not only useful for
developing GUI programs, but also an excellent pedagogical tool for learning object-oriented
programming. This part introduces Java GUI programming using JavaFX in Chapters 14–16.
Major topics include GUI basics (Chapter 14), container panes (Chapter 14), drawing shapes
(Chapter 14), event-driven programming (Chapter 15), animations (Chapter 15), and GUI con-
trols (Chapter 16), and playing audio and video (Chapter 16). You will learn the architecture
of JavaFX GUI programming and use the controls, shapes, panes, image, and video to develop
useful applications.

Appendixes
This part of the book covers a mixed bag of topics. Appendix A lists Java keywords.
­Appendix B gives tables of ASCII characters and their associated codes in decimal and in
hex. Appendix C shows the operator precedence. Appendix D summarizes Java modifiers and
their usage. Appendix E discusses special floating-point values. Appendix F introduces num-
ber systems and conversions among binary, decimal, and hex numbers. Finally, Appendix G
introduces bitwise operations. Appendix H introduces regular expressions. Appendix I covers
enumerated types.

Java Development Tools


You can use a text editor, such as the Windows Notepad or WordPad, to create Java programs
and to compile and run the programs from the command window. You can also use a Java
development tool, such as NetBeans or Eclipse. These tools support an integrated develop-
ment environment (IDE) for developing Java programs quickly. Editing, compiling, building,
executing, and debugging programs are integrated in one graphical user interface. Using these
tools effectively can greatly increase your programming productivity. NetBeans and Eclipse
are easy to use if you follow the tutorials. Tutorials on NetBeans and Eclipse can be found in IDE tutorials
the supplements on the Companion Website at www.pearsonglobaleditions.com/Liang.

Student Resources
The Companion Website (www.pearsonglobaleditions.com/Liang) contains the following
resources:
■■ Answers to CheckPoint questions
■■ Solutions to majority of even-numbered programming exercises
■■ Source code for the examples in the book
■■ Interactive quiz (organized by sections for each chapter)
■■ Supplements
■■ Debugging tips
■■ Video notes
■■ Algorithm animations
8 Preface

Supplements
The text covers the essential subjects. The supplements extend the text to introduce additional
topics that might be of interest to readers. The supplements are available from the Companion
Website.

Instructor Resources
The Companion Website, accessible from www.pearsonglobaleditions.com/Liang, c­ ontains the
following resources:
■■ Microsoft PowerPoint slides with interactive buttons to view full-color, syntax-highlighted
source code and to run programs without leaving the slides.
■■ Solutions to a majority of odd-numbered programming exercises.
■■ More than 200 additional programming exercises and 300 quizzes organized by ­chapters.
These exercises and quizzes are available only to the instructors. Solutions to these
­exercises and quizzes are provided.
■■ Web-based quiz generator. (Instructors can choose chapters to generate quizzes from a
large database of more than two thousand questions.)
■■ Sample exams. Most exams have four parts:
■■ Multiple-choice questions or short-answer questions
■■ Correct programming errors
■■ Trace programs
■■ Write programs
■■ Sample exams with ABET course assessment.
■■ Projects. In general, each project gives a description and asks students to analyze, design,
and implement the project.
Some readers have requested the materials from the Instructor Resource Center. Please
­understand that these are for instructors only. Such requests will not be answered.

Online Practice and Assessment


with MyProgrammingLab
MyProgrammingLab helps students fully grasp the logic, semantics, and syntax of program-
ming. Through practice exercises and immediate, personalized feedback, MyProgrammingLab
improves the programming competence of beginning students who often struggle with the
basic concepts and paradigms of popular high-level programming languages.
A self-study and homework tool, a MyProgrammingLab course consists of hundreds of
small practice problems organized around the structure of this textbook. For students, the sys-
tem automatically detects errors in the logic and syntax of their code submissions and offers
targeted hints that enable students to figure out what went wrong—and why. For instructors,
a comprehensive gradebook tracks correct and incorrect answers and stores the code inputted
by students for review.
Preface  9
MyProgrammingLab is offered to users of this book in partnership with Turing’s Craft, the
makers of the CodeLab interactive programming exercise system. For a full demonstration,
to see feedback from instructors and students, or to get started using MyProgrammingLab in
your course, visit www.myprogramminglab.com.

Video Notes
We are excited about the new Video Notes feature that is found in this new edition. These VideoNote

videos provide additional help by presenting examples of key topics and showing how
to solve problems completely, from design through coding. Video Notes are available from
www.pearsonglobaleditions.com/Liang.

Algorithm Animations
We have provided numerous animations for algorithms. These are valuable pedagogical tools Animation
to demonstrate how algorithms work. Algorithm animations can be accessed from the Com-
panion Website.
10 Preface

Acknowledgments
I would like to thank Armstrong State University for enabling me to teach what I write and for
supporting me in writing what I teach. Teaching is the source of inspiration for continuing to
improve the book. I am grateful to the instructors and students who have offered comments,
suggestions, bug reports, and praise.
This book has been greatly enhanced thanks to outstanding reviews for this and previous
editions. The reviewers are: Elizabeth Adams (James Madison University), Syed Ahmed (North
Georgia College and State University), Omar Aldawud (Illinois Institute of Technology), Stefan
Andrei (Lamar University), Yang Ang (University of Wollongong, Australia), Kevin Bierre
(Rochester Institute of Technology), Aaron Braskin (Mira Costa High School), David Champion
(DeVry Institute), James Chegwidden (Tarrant County College), Anup Dargar (University of
North Dakota), Daryl Detrick (Warren Hills Regional High School), Charles Dierbach (Towson
University), Frank Ducrest (University of Louisiana at Lafayette), Erica Eddy (University of
Wisconsin at Parkside), Summer Ehresman (Center Grove High School), Deena Engel (New
York University), Henry A. Etlinger (Rochester Institute of Technology), James Ten Eyck
(Marist College), Myers Foreman (Lamar University), Olac Fuentes (University of Texas at
El Paso), Edward F. Gehringer (North Carolina State University), Harold Grossman (Clemson
University), Barbara Guillot (Louisiana State University), Stuart Hansen (University of Wis-
consin, Parkside), Dan Harvey (Southern Oregon University), Ron Hofman (Red River College,
Canada), Stephen Hughes (Roanoke College), Vladan Jovanovic (Georgia Southern University),
Deborah Kabura Kariuki (Stony Point High School), Edwin Kay (Lehigh University), Larry
King (University of Texas at Dallas), Nana Kofi (Langara College, Canada), George Koutsogi-
annakis (Illinois Institute of Technology), Roger Kraft (Purdue University at Calumet), Norman
Krumpe (Miami University), Hong Lin (DeVry Institute), Dan Lipsa (Armstrong State Univer-
sity), James Madison (Rensselaer Polytechnic Institute), Frank Malinowski (Darton College),
Tim Margush (University of Akron), Debbie Masada (Sun Microsystems), Blayne Mayfield
(Oklahoma State University), John McGrath (J.P. McGrath Consulting), Hugh McGuire (Grand
Valley State), Shyamal Mitra (University of Texas at Austin), Michel Mitri (James Madison
University), Kenrick Mock (University of Alaska Anchorage), Frank Murgolo (California State
University, Long Beach), Jun Ni (University of Iowa), Benjamin Nystuen (University of Colo-
rado at Colorado Springs), Maureen Opkins (CA State University, Long Beach), Gavin Osborne
(University of Saskatchewan), Kevin Parker (Idaho State University), Dale Parson (Kutztown
University), Mark Pendergast (Florida Gulf Coast University), Richard Povinelli (Marquette
University), Roger Priebe (University of Texas at Austin), Mary Ann Pumphrey (De Anza Junior
College), Pat Roth (Southern Polytechnic State University), Amr Sabry (Indiana University),
Ben Setzer (Kennesaw State University), Carolyn Schauble (Colorado State University), David
Scuse (University of Manitoba), Ashraf Shirani (San Jose State University), Daniel Spiegel
(Kutztown University), Joslyn A. Smith (Florida Atlantic University), Lixin Tao (Pace Uni-
versity), Ronald F. Taylor (Wright State University), Russ Tront (Simon Fraser University),
Deborah Trytten (University of Oklahoma), Michael Verdicchio (Citadel), Kent Vidrine (George
Washington University), and Bahram Zartoshty (California State University at Northridge).
It is a great pleasure, honor, and privilege to work with Pearson. I would like to thank Tracy
Johnson and her colleagues Marcia Horton, Demetrius Hall, Yvonne Vannatta, Kristy Alaura,
Carole Snyder, Scott Disanno, Bob Engelhardt, Shylaja Gattupalli, and their colleagues for
organizing, producing, and promoting this project.
As always, I am indebted to my wife, Samantha, for her love, support, and encouragement.
Preface  11

Acknowledgments for the Global Edition


Pearson would like to thank and acknowledge Yvan Maillot (Univresite Haute-Alsace) and
Steven Yuwono (National University of Singapore) for contributing to this Global Edition,
and Arif Ahmed (National Institute of Technology, Silchar), Annette Bieniusa (University
of Kaiserslautern), Shaligram Prajapat (Devi Ahilya Vishwavidyalaya, Indore), and Ram
Gopal Raj (University of Malaya) for reviewing this Global Edition.
CONTENTS
Chapter 1 I ntroduction to Computers,
­Programs, and Java™ 23
1.1 Introduction 24
1.2 What Is a Computer? 24
1.3 Programming Languages 29
1.4 Operating Systems 31
1.5 Java, the World Wide Web, and Beyond 32
1.6 The Java Language Specification, API, JDK,
JRE, and IDE 33
1.7 A Simple Java Program 34
1.8 Creating, Compiling, and Executing a Java Program 37
1.9 Programming Style and Documentation 40
1.10 Programming Errors 42
1.11 Developing Java Programs Using NetBeans 45
1.12 Developing Java Programs Using Eclipse 47

Chapter 2 Elementary Programming 55


2.1 Introduction 56
2.2 Writing a Simple Program 56
2.3 Reading Input from the Console 59
2.4 Identifiers 62
2.5 Variables 62
2.6 Assignment Statements and Assignment Expressions 64
2.7 Named Constants 65
2.8 Naming Conventions 66
2.9 Numeric Data Types and Operations 67
2.10 Numeric Literals 70
2.11 Evaluating Expressions and Operator Precedence 72
2.12 Case Study: Displaying the Current Time 74
2.13 Augmented Assignment Operators 76
2.14 Increment and Decrement Operators 77
2.15 Numeric Type Conversions 79
2.16 Software Development Process 81
2.17 Case Study: Counting Monetary Units 85
2.18 Common Errors and Pitfalls 87

Chapter 3 Selections 97
3.1 Introduction 98
3.2 boolean Data Type 98
3.3 if Statements 100
3.4 Two-Way if-else Statements 102
3.5 Nested if and Multi-Way if-else Statements 103
3.6 Common Errors and Pitfalls 105
3.7 Generating Random Numbers 109
3.8 Case Study: Computing Body Mass Index 111
3.9 Case Study: Computing Taxes 112
3.10 Logical Operators 115
3.11 Case Study: Determining Leap Year 119
3.12 Case Study: Lottery 120
3.13 switch Statements 122
12
Contents  13
3.14 Conditional Operators 125
3.15 Operator Precedence and Associativity 126
3.16 Debugging 128

Chapter 4 Mathematical Functions,


Characters, and Strings 141
4.1 Introduction 142
4.2 Common Mathematical Functions 142
4.3 Character Data Type and Operations 147
4.4 The String Type 152
4.5 Case Studies 161
4.6 Formatting Console Output 167

Chapter 5 Loops 181


5.1 Introduction 182
5.2 The while Loop 182
5.3 Case Study: Guessing Numbers 185
5.4 Loop Design Strategies 188
5.5 Controlling a Loop with User Confirmation or a Sentinel Value 190
5.6 The do-while Loop 192
5.7 The for Loop 195
5.8 Which Loop to Use? 198
5.9 Nested Loops 200
5.10 Minimizing Numeric Errors 202
5.11 Case Studies 204
5.12 Keywords break and continue 208
5.13 Case Study: Checking Palindromes 211
5.14 Case Study: Displaying Prime Numbers 213

Chapter 6 Methods 227


6.1 Introduction 228
6.2 Defining a Method 228
6.3 Calling a Method 230
6.4 void vs. Value-Returning Methods 233
6.5 Passing Parameters by Values 236
6.6 Modularizing Code 239
6.7 Case Study: Converting Hexadecimals to Decimals 241
6.8 Overloading Methods 243
6.9 The Scope of Variables 246
6.10 Case Study: Generating Random Characters 247
6.11 Method Abstraction and Stepwise Refinement 249

Chapter 7 Single-Dimensional Arrays 269


7.1 Introduction 270
7.2 Array Basics 270
7.3 Case Study: Analyzing Numbers 277
7.4 Case Study: Deck of Cards 278
7.5 Copying Arrays 280
7.6 Passing Arrays to Methods 281
7.7 Returning an Array from a Method 284
7.8 Case Study: Counting the Occurrences of Each Letter 285
7.9 Variable-Length Argument Lists 288
7.10 Searching Arrays 289
7.11 Sorting Arrays 293
14 Contents
7.12 The Arrays Class 294
7.13 Command-Line Arguments 296

Chapter 8 Multidimensional Arrays 311


8.1 Introduction 312
8.2 Two-Dimensional Array Basics 312
8.3 Processing Two-Dimensional Arrays 315
8.4 Passing Two-Dimensional Arrays to Methods 317
8.5 Case Study: Grading a Multiple-Choice Test 318
8.6 Case Study: Finding the Closest Pair 320
8.7 Case Study: Sudoku 322
8.8 Multidimensional Arrays 325

Chapter 9 Objects and Classes 345


9.1 Introduction 346
9.2 Defining Classes for Objects 346
9.3 Example: Defining Classes and Creating Objects 348
9.4 Constructing Objects Using Constructors 353
9.5 Accessing Objects via Reference Variables 354
9.6 Using Classes from the Java Library 358
9.7 Static Variables, Constants, and Methods 361
9.8 Visibility Modifiers 366
9.9 Data Field Encapsulation 368
9.10 Passing Objects to Methods 371
9.11 Array of Objects 375
9.12 Immutable Objects and Classes 377
9.13 The Scope of Variables 379
9.14 The this Reference 380

Chapter 10 Object-Oriented Thinking 389


10.1 Introduction 390
10.2 Class Abstraction and Encapsulation 390
10.3 Thinking in Objects 394
10.4 Class Relationships 397
10.5 Case Study: Designing the Course Class 400
10.6 Case Study: Designing a Class for Stacks 402
10.7 Processing Primitive Data Type Values as Objects 404
10.8 Automatic Conversion between Primitive Types
and Wrapper Class Types 407
10.9 The BigInteger and BigDecimal Classes 408
10.10 The String Class 410
10.11 The StringBuilder and StringBuffer Classes 416

Chapter 11 Inheritance and


Polymorphism 433
11.1 Introduction 434
11.2 Superclasses and Subclasses 434
11.3 Using the super Keyword 440
11.4 Overriding Methods 443
11.5 Overriding vs. Overloading 444
11.6 The Object Class and Its toString() Method 446
11.7 Polymorphism 447
11.8 Dynamic Binding 447
11.9 Casting Objects and the instanceof Operator 451
11.10 The Object’s equals Method 455
Contents  15
11.11 The ArrayList Class 456
11.12 Useful Methods for Lists 462
11.13 Case Study: A Custom Stack Class 463
11.14 The protected Data and Methods 464
11.15 Preventing Extending and Overriding 467

Chapter 12 Exception Handling


and Text I/O 475
12.1 Introduction 476
12.2 Exception-Handling Overview 476
12.3 Exception Types 481
12.4 More on Exception Handling 484
12.5 The finally Clause 492
12.6 When to Use Exceptions 493
12.7 Rethrowing Exceptions 494
12.8 Chained Exceptions 495
12.9 Defining Custom Exception Classes 496
12.10 The File Class 499
12.11 File Input and Output 502
12.12 Reading Data from the Web 508
12.13 Case Study: Web Crawler 510

Chapter 13 Abstract Classes and Interfaces 521


13.1 Introduction 522
13.2 Abstract Classes 522
13.3 Case Study: the Abstract Number Class 527
13.4 Case Study: Calendar and GregorianCalendar 529
13.5 Interfaces 532
13.6 The Comparable Interface 535
13.7 The Cloneable Interface 540
13.8 Interfaces vs. Abstract Classes 545
13.9 Case Study: The Rational Class 548
13.10 Class-Design Guidelines 553

Chapter 14 JavaFX Basics 563


14.1 Introduction 564
14.2 JavaFX vs Swing and AWT 564
14.3 The Basic Structure of a JavaFX Program 564
14.4 Panes, Groups, UI Controls, and Shapes 567
14.5 Property Binding 570
14.6 Common Properties and Methods for Nodes 573
14.7 The Color Class 575
14.8 The Font Class 576
14.9 The Image and ImageView Classes 578
14.10 Layout Panes and Groups 580
14.11 Shapes 589
14.12 Case Study: The ClockPane Class 602

Chapter 15 Event-Driven Programming


and Animations 615
15.1 Introduction 616
15.2 Events and Event Sources 618
15.3 Registering Handlers and Handling Events 619
15.4 Inner Classes 623
15.5 Anonymous Inner Class Handlers 624
16 Contents
15.6 Simplifying Event Handling Using Lambda Expressions 627
15.7 Case Study: Loan Calculator 631
15.8 Mouse Events 633
15.9 Key Events 635
15.10 Listeners for Observable Objects 638
15.11 Animation 640
15.12 Case Study: Bouncing Ball 648
15.13 Case Study: US Map 652

Chapter 16 JavaFX UI Controls


and Multimedia 665
16.1 Introduction 666
16.2 Labeled and Label 666
16.3 Button 668
16.4 CheckBox 670
16.5 RadioButton 673
16.6 TextField 676
16.7 TextArea 677
16.8 ComboBox 681
16.9 ListView 684
16.10 ScrollBar 687
16.11 Slider 690
16.12 Case Study: Developing a Tic-Tac-Toe Game 693
16.13 Video and Audio 698
16.14 Case Study: National Flags and Anthems 701

Chapter 17 Binary I/O 713


17.1 Introduction 714
17.2 How Is Text I/O Handled in Java? 714
17.3 Text I/O vs. Binary I/O 715
17.4 Binary I/O Classes 716
17.5 Case Study: Copying Files 726
17.6 Object I/O 728
17.7 Random-Access Files 733

Chapter 18 Recursion 741


18.1 Introduction 742
18.2 Case Study: Computing Factorials 742
18.3 Case Study: Computing Fibonacci
Numbers 745
18.4 Problem Solving Using Recursion 748
18.5 Recursive Helper Methods 750
18.6 Case Study: Finding the Directory Size 753
18.7 Case Study: Tower of Hanoi 755
18.8 Case Study: Fractals 758
18.9 Recursion vs. Iteration 762
18.10 Tail Recursion 762

Appendixes 773
Appendix A Java Keywords 775
Appendix B The ASCII Character Set 776
Contents  17

Appendix C Operator Precedence Chart 778


Appendix D Java Modifiers 780
Appendix E Special Floating-Point Values 782
Appendix F Number Systems 783
Appendix G Bitwise Operations 787
Appendix H Regular Expressions 788
Appendix I Enumerated Types 793

Quick Reference 799


Index 801
This page intentionally left blank
VideoNotes
Locations of VideoNotes
VideoNote
www.pearsonglobaleditions.com/Liang

Chapter 1 Introduction to Computers, Programs, Selection sort 293


and Java™ 23 Command-line arguments 297
Your first Java program 34 Coupon collector’s problem 304
Compile and run a Java program 39 Consecutive four 306
NetBeans brief tutorial 45
Eclipse brief tutorial 47 Chapter 8 Multidimensional Arrays 311
Find the row with the largest sum 316
Chapter 2 Elementary Programming 55 Grade multiple-choice test 318
Obtain input 59 Sudoku 322
Use operators / and % 74 Multiply two matrices 331
Software development Even number of 1s 338
process 81
Compute loan payments 82 Chapter 9 Objects and Classes 345
Compute BMI 94 Define classes and objects 346
Use classes 358
Chapter 3 Selections 97 Static vs. instance 361
Program addition quiz 99 Data field encapsulation 368
Program subtraction quiz 109 The this keyword 380
Use multi-way if-else The Fan class 386
statements 112
Sort three integers 132 Chapter 10 Object-Oriented Thinking 389
Check point location 134 The Loan class 391
The BMI class 394
Chapter 4 Mathematical Functions, Characters, The StackOfIntegers class 402
and Strings 141 Process large numbers 408
Introduce Math functions 142 The String class 410
Introduce strings and objects 152 The MyPoint class 424
Convert hex to decimal 165
Compute great circle distance 173 Chapter 11 Inheritance and Polymorphism 433
Convert hex to binary 176 Geometric class hierarchy 434
Polymorphism and dynamic
Chapter 5 Loops 181 binding demo 448
Use while loop 182 The ArrayList class 456
Guess a number 185 The MyStack class 463
Multiple subtraction quiz 188 New Account class 470
Use do-while loop 192
Minimize numeric errors 202 Chapter 12 Exception Handling and Text I/O 475
Display loan schedule 219 Exception-handling advantages 476
Sum a series 220 Create custom exception classes 496
Write and read data 502
Chapter 6 Methods 227 HexFormatException 515
Define/invoke max method 230
Use void method 233 Chapter 13 Abstract Classes and Interfaces 521
Modularize code 239 Abstract GeometricObject class 522
Stepwise refinement 249 Calendar and Gregorian
Reverse an integer 258 Calendar classes 529
Estimate p 261 The concept of interface 532
Redesign the Rectangle class 558
Chapter 7 Single-Dimensional Arrays 269
Random shuffling 274 Chapter 14 JavaFX Basics 563
Deck of cards 278 Getting started with JavaFX 564

19
20 VideoNotes
Understand property binding 570 Use Slider 690
Use Image and ImageView 578 Tic-Tac-Toe 693
Use layout panes 580 Use Media, MediaPlayer,
Use shapes 589 and MediaView 698
Display a tic-tac-toe board 608 Use radio buttons and text
Display a bar chart 610 fields 705
Set fonts 707
Chapter 15 Event-Driven Programming
and Animations 615 Chapter 17 Binary I/O 713
Handler and its registration 622 Copy file 726
Anonymous handler 625 Object I/O 728
Move message using the mouse 634 Split a large file 738
Animate a rising flag 640
Flashing text 646 Chapter 18 Recursion 741
Simple calculator 656 Binary search 752
Check mouse-point location 658 Directory size 753
Display a running fan 661 Fractal (Sierpinski triangle) 758
Search a string in a directory 769
Chapter 16 JavaFX UI Controls and Multimedia 665 Recursive tree 772
Use ListView 684
Animations

Chapter 7 Single-Dimensional Arrays 269 Chapter 8 Multidimensional Arrays 311


linear search animation on closest-pair animation on
Companion Website 290 the Companion Website 320
binary search animation on
Companion Website 290
selection sort animation on
Companion Website 293

21
This page intentionally left blank
Chapter

1
Introduction
to Computers,
Programs, and Java™
Objectives
■■ To understand computer basics, programs, and operating systems
(§§1.2–1.4).
■■ To describe the relationship between Java and the World Wide Web
(§1.5).
■■ To understand the meaning of Java language specification, API, JDK™,
JRE™, and IDE (§1.6).
■■ To write a simple Java program (§1.7).
■■ To display output on the console (§1.7).
■■ To explain the basic syntax of a Java program (§1.7).
■■ To create, compile, and run Java programs (§1.8).
■■ To use sound Java programming style and document programs properly
(§1.9).
■■ To explain the differences between syntax errors, runtime errors, and
logic errors (§1.10).
■■ To develop Java programs using NetBeans™ (§1.11).
■■ To develop Java programs using Eclipse™ (§1.12).
Another Random Scribd Document
with Unrelated Content
The Project Gutenberg eBook of The Juggler's
Oracle; or, The Whole Art of Legerdemain Laid
Open
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

Title: The Juggler's Oracle; or, The Whole Art of Legerdemain


Laid Open

Author: H. Boaz

Release date: July 12, 2018 [eBook #57487]

Language: English

Credits: Produced by Charlie Howard and the Online Distributed


Proofreading Team at http://www.pgdp.net (This file
was
produced from images generously made available by
the
Library of Congress)

*** START OF THE PROJECT GUTENBERG EBOOK THE JUGGLER'S


ORACLE; OR, THE WHOLE ART OF LEGERDEMAIN LAID OPEN ***
THE
JUGGLER’S ORACLE;
OR,

THE WHOLE ART


OF

Legerdemain Laid Open:


CONSISTING OF
ALL THE NEWEST AND MOST SURPRISING
TRICKS AND EXPERIMENTS,
WITH

CARDS,
CUPS AND BALLS,
CONVEYANCE OF MONEY AND RINGS,
BOXES,
FIRE,
STRINGS AND KNOTS;

WITH
MANY CURIOUS EXPERIMENTS

By Optical Illusion, Chymical Changes, and


Magical Cards, &c.

THE WHOLE

Illustrated by upwards of Forty Wood Engravings.


BY THE SIEUR H. BOAZ,
THIRTY YEARS PROFESSOR OF THE ART.

LONDON:
PRINTED FOR WILLIAM COLE,
10, NEWGATE STREET.

PRINTED BY G. H. DAVIDSON,
IRELAND YARD, DOCTORS’ COMMONS.
CONTENTS.
Page.
Description of the Operator 1

TRICKS WITH CARDS.


1. To deliver Four Aces, and to convert them
into Knaves 2
2. Method of making the Pass 3
3. The Card of Divination 4
Another Way 5
4. The Four Confederate Cards 5
5. The Fifteen Thousand Livres 5
6. The Magic Ring 7
7. The Card in the Mirror 8
8. The Marvellous Vase 9
9. The Nerve Trick 10
10. To make the Constable catch the Knave 11
11. To change a Card into a King or Queen 11
12. To tell a Person what Card he took Notice of 12
13. To tell what Card is at the Bottom, when
the Pack is shuffled 12
14. Another Way, not having seen the Cards 12
15. To tell, without Confederacy, what Card one
thinks of 13
16. To make a Card jump out of the Pack, and
run on the Table 13
17. To tell a Card, and to convey the Same into
a Nut or Cherry-Stone 13
18. To let Twenty Gentlemen draw Twenty
Cards, and to make one Card every
Man’s Card 13
19. To transform the Four Kings into Aces, and
afterwards to render them all Blank
Cards 13
20. To name all the Cards in the Pack, and yet
never see them 15
21. To show any one what Card he takes Notice
of 15
22. To tell the Number of Spots on the Bottom
Cards, laid down in several Heaps 16
23. To make any two Cards come together
which may be named 17
24. Card nailed to the Wall by a Pistol-shot 17
25. To tell what Card one thinks of 19
26. Another Way 19
27. To make a Card jump out of an Egg 20
28. The Little Sportsman 20

CUPS AND BALLS.


29. To pass the Balls through the Cups 22
30. A still more Extraordinary Mode of Playing
at Cups and Balls 26

CONVEYANCE OF MONEY, &c.


31. To convey Money from one Hand to the
other 28
32. To convert Money into Counters, and the
Reverse 28
33. To put a Sixpence into each Hand, and,
with Words, bring them together 29
34. To put a Sixpence into a Stranger’s Hand,
and another into your own, and to
convey both into the Stranger’s Hand
with Words 29
35. To show the same Feat otherwise 29
36. To throw a Piece of Money away, and find it
again 30
37. To make a Sixpence leap out of a Pot or to
run along a Table 30
38. To make a Sixpence sink through a Table,
and to vanish out of a Handkerchief 30
39. To know if a Coin be a Head or Woman,
and the Party to stand in another Room 31
40. To command Seven Halfpence through the
Table 31
41. To command a Sixpence out of a Box 32
42. To blow a Sixpence out of another Man’s
Hand 32
43. To make a Ring shift from one Hand to
another, and to make it go on whatever
Finger is required, while Somebody
holds both Arms 33
44. To transfer a Counter into a Silver Groat 34
45. To make a Silver Twopence be plain in the
Palm of your Hand, and be passed from
thence wherever you like 35
46. To convey a Sixpence out of the Hand of
one that holds it fast 35
47. To convey a Shilling from one Hand into
another, holding your Hands apart 36
48. To transform any small Thing into any other
Form, by folding of Paper 36
49. Another Trick of the same Nature 36
50. A Watch recovered after being beaten to
Pieces in a Mortar 37

TRICKS WITH BOXES, &c.


51. The Egg-Box 38
52. The Penetrative Guinea 39
53. The Chest which opens at Command 40
54. The Melting-Box 41
55. Trick upon the Globe-Box 42
56. Trick with the Funnel 44
57. The Magical Bell and Bushel 44
58. Out of an Empty Bag to bring upwards of
an Hundred Eggs; and, afterwards, a
living Fowl 45
59. Bonus Genius; or, Hiccius Doctius 46
60. To make a Knife leap out of a Pot 47
61. To turn a Box of Bird-seed into a living Bird 47

EXPERIMENTS WITH FIRE.


62. To produce a Carmine Red Flame 48
63. An Orange-coloured Flame 48
64. To make Balloons with Soap and Water that
catch Fire and detonate 48
65. A Brilliant Blue Flame 49
66. An Emerald Green Flame 49
67. Loud Detonations, like the Discharge of
Artillery 49
68. A Well of Fire 50
69. To make a Room seem all on Fire 50
70. To walk on a Hot Iron Bar, without Danger
of Burning 50
71. To eat Fire, and blow it up in your Mouth
with a Pair of Bellows 50
72. To Light a Candle by a Glass of Water 52
73. Fulminating Powder 52
74. To set Fire to a Combustible Body by the
Reflection of Two Concave Mirrors 52
75. To give the Faces of the Company the
Appearance of Death 53
76. To dispose two Little Figures, so that one
shall light a Candle, and the other put it
out 53
77. To construct a Lantern which will enable a
Person to read by Night, at a great
Distance 53

TRICKS WITH STRINGS, KNOTS, &c.


78. To cut a Lace asunder in the Middle, and to
make it Whole again 54
79. To burn a Thread and make it Whole again
with the Ashes 54
80. To pull many Yards of Ribbon out of the
Mouth 55
81. To cut a Piece of Tape into Four Parts, and
make it Whole again with Words 55
82. To unloose a Knot upon a Handkerchief, by
Words 57
83. To draw a Cord through the Nose 58
84. To take Three Button-Moulds off a String 59
OPTICAL ILLUSIONS.
85. The Multiplying Mirror 60
86. The Magic-Lantern 61
87. The Phantascope 61
88. The Enchanted Mirrors 63
89. The Wonderful Phantoms 64
90. The Real Apparition 65
91. To draw a Deformed Figure, which will
appear well proportioned from a certain
Point of View 67

CHEMICAL CHANGES.
92. To change the Colour of a Rose 67
93. To turn Water into Wine 67
94. Arbor Dianæ; or, the Silver Tree 68
95. The Lead Tree 68
96. The Tree of Mars 68
97. To form a Metallic Tree, in the Shape of a
Fir 69
98. To make a Gold or Silver Tree, to serve as a
Chimney Ornament 69
99. Sympathetic or Secret Inks 70
100. Preparation of Green Sympathetic Ink 70
101. Blue Sympathetic Ink 70
102. Yellow Sympathetic Ink 71
103. Purple Sympathetic Ink 71
104. Rose-coloured Sympathetic Ink 71
105. Application of the Secret Inks 71
106. A Drawing which alternately represents
Winter and Summer Scenes 71
107. Demonstration of the various Strata of
Earth which cover the Globe 72
108. To freeze Water in the Midst of Summer,
without the Application of Ice 72

MISCELLANEOUS TRICKS AND


EXPERIMENTS.
109. To swallow a long Pudding made of Tin 73
110. An artificial Spider 74
111. To pass a Ring through your Cheek 74
112. To cut a Hole in a Cloak, Scarf, or
Handkerchief, and by Words to make it
Whole again 75
113. The Dancing Egg 75
114. To make three Figures Dance in a Glass 76
115. To shoot a Swallow, and to bring him to Life
again 77
116. Singular Trick with a Fowl 77
117. To put a Lock upon a Man’s Mouth 77
118. To thrust a Bodkin into the Forehead,
without Hurt 79
119. To thrust a Bodkin through your Tongue 79
120. To appear to cut your Arm off, without any
Hurt or Danger 80
121. Tricks with a Cat 80
122. To make a Calf’s Head bellow, when served
up to Table 81
123. To make a Ball rise above the Water 81
124. Mode of sealing Letters, whereby the
Impression cannot be taken 81
125. The Enchanted Egg 82
126. To cut a Man’s Head off, and to put the
Head into a Platter, a Yard from the
Body 82
127. To cause Beer to be wrung out of the
Handle of a Knife 83
128. To cut a Glass by Heat 84
THE
JUGGLER’S ORACLE.
LEGERDEMAIN, OR SLEIGHT-OF-
HAND,
Is an art whereby a person seems to work wonderful, incredible,
and almost impossible feats. There is no supernatural or infernal
agency in the case; for every trick is performed by nimbleness,
agility, and effrontery.

The Operator.
The Operator, or Conjurer, should be a person of bold and
undaunted resolution, so as to set a good face upon the matter, in
case of the occurrence of any mistake whereby a discovery of the
nature of the trick in hand may take place by one of the spectators.
He ought to have a great variety of strange terms and high-
sounding words at command, so as to grace his actions, amaze the
beholders, and draw their attention from the more minute
operations.
He ought likewise to use such gestures of body as may help to
draw off the attention of the spectators from a strict scrutiny of his
actions.
In showing feats and juggling with cards, the principal point
consists in the shuffling them nimbly, and always keeping one card
either at the bottom or in some known place of the pack, four or five
cards from it; hereby you will seem to work wonders, for it will be
easy for you to see one card, which, though you be perceived to do
it, will not be suspected, if you shuffle them well afterwards; and
this caution I must give you, that, in reserving the bottom card, you
must always, whilst you shuffle, keep it a little before or a little
behind all the cards lying underneath it, bestowing it either a little
beyond its fellows before, right over the fore-finger, or else behind
the rest, so as the little finger of the left hand may meet with it,
which is the easier, readier, and better way. In the beginning of your
shuffling, shuffle as thick as you can, and, in the end, throw upon
the pack the nether card, with so many more, at the least, as you
would have preserved for any purpose, a little before or a little
behind the rest, provided always that your fore-finger (if the pack lie
behind) creep up to meet with the bottom card; and, when you feel
it, you may then hold it until you have shuffled over the cards again,
still leaving your kept card below. Being perfect herein, you may do
almost what you like with cards by this means: what pack soever
you use, though it consist of eight, twelve, or twenty cards, you may
keep them still together unsevered, next to the card, and yet shuffle
them often, to satisfy the admiring beholders. As for example, and
for brevity sake, to show divers feats under one:—

To deliver Four Aces, and to convert them into


Knaves.
Make a pack of these eight cards, viz. four knaves and four aces;
and, although the eight cards must be immediately together, yet
must each knave and ace be evenly set together, and the same eight
cards must lie also in the lowest place of the pack; then shuffle them
so always, at the second shuffling; so that, at the end of shuffling
the said pack, one ace may lie undermost, or so as you may know
where it goeth and lieth always: I say, let your aforesaid pack, with
three or four cards more, lie inseparable together, immediately upon
and with that ace. Then using some speech or other device, and
putting your hands, with the cards, to the edge of the table, to hide
the action, let out, privately, a piece of the second card, which is one
of the knaves, holding forth the pack in both your hands, and
showing to the standers-by the nether card, which is the ace, or
kept card, covering also the head or piece of the knave, which is the
next card, and, with your fore-finger, draw out the same knave,
laying it down on the table; then shuffle them again, keeping your
pack whole, and so have your two aces lying together at the bottom.
And, to reform that disordered card, and also to grace and
countenance that action, take off the uppermost card of the bunch,
and thrust it into the midst of the cards, and then take away the
nethermost card, which is one of your said aces, and bestow it
likewise; then you may begin as before, showing another ace, and
instead thereof lay down another knave, and so forth, until, instead
of four aces, you have laid down four knaves; the spectators, all this
while, thinking that four aces lie on the table, are greatly amused,
and will wonder at the transformation. You must be well practised in
shuffling the pack, lest you overshoot yourself.
TRICKS WITH CARDS.
Method of making the Pass.
This art consists in bringing a certain number of cards from the
bottom of the pack to the top. I shall explain the method of doing it,
before proceeding further, as many of the following recreations
depend on the dexterous performance of this manœuvre. Hold the
pack of cards in your right hand, so that the palm of your hand may
be under the cards. Place the thumb of that hand on one side of the
pack, the first, second, and third fingers on the other side, and your
little finger between those cards that are to be brought to the top,
and the rest of the pack. Then place your left hand over the cards,
in such a manner that the thumb may be at C, and the fingers at B,
according to the following figures:—

The hands and the two parts of the cards being thus disposed,
you draw off the lower cards, confined by the little finger and the
other parts of the right hand, and place them, with an imperceptible
motion, on the top of the pack. It is necessary, before you attempt
any of the recreations that depend on making the pass, that you can
perform it so dexterously that the eye cannot distinguish the motion
of your hand; otherwise, instead of deceiving others, you will expose
yourself. It is also proper that the cards make no noise, as that will
occasion suspicion. This dexterity is not to be attained without some
practice. It is sometimes usual to prepare a pack of cards, by
inserting one or more that are a small matter longer or wider than
the rest; and that preparation will be necessary in some of the
following recreations.

The Card of Divination.


Have a pack in which there is a longer card than the rest; open
the pack at that part where the long card is, and present the pack to
a person in such a manner that he will naturally draw that card. He
is then to put it into any part of the pack, and shuffle the cards. You
take the pack and offer the same card in like manner to a second or
third person; observing, however, that they do not stand near
enough to observe the card each other draws. You then draw several
cards yourself, among which is the long card; and ask each of the
parties if his card be among those cards, and he will naturally say
yes, as they have all drawn the same card. You then shuffle all the
cards together, and, cutting them at the long card, you hold it before
the first person, so that the others may not see it, and tell him that
is his card. You then put it again in the pack, and, shuffling them a
second time, you cut again at the same card, and hold it in like
manner to the second person; and so of the rest.
If the first person should not draw the long card, each of the
parties must draw different cards; when, cutting the pack at the long
card, you put those they have drawn over it, and, seeming to shuffle
the cards indiscriminately, you cut them again at the long card, and
show one of them his card. You then shuffle and cut again, in the
same manner, and show another person his card, and so on;
remembering that the card drawn by the last person is the first next
the long card; and so of the others.

Another Way.
This recreation may be performed without the long card, in the
following manner: let a person draw any card whatever, and replace
it in the pack; you then make the pass, and bring that card to the
top of the pack, and shuffle them without losing sight of that card.
You then offer that card to a second person, that he may draw it,
and put it in the middle of the pack. You make the pass, and shuffle
the cards a second time, in the same manner, and offer the card to a
third person; and so again to a fourth or fifth.

The Four Confederate Cards.


You let a person draw any four cards from the pack, and tell him
to think of one of them. When he returns you the four cards, you
dexterously place two of them under the pack, and two on the top.
Under those at the bottom you place four cards of any sort, and
then, taking eight or ten from the bottom cards, you spread them on
the table, and ask the person if the card he fixed on be among
them. If he say no, you are sure it is one of the two cards on the
top. You then pass those two cards to the bottom, and, drawing off
the lowest of them, you ask if that is not his card. If he again say
no, you take that card up, and bid him draw his card from the
bottom of the pack. If the person says his card is among those you
first drew from the bottom, you must dexterously take up the four
cards that you put under them, and, placing those on the top, let the
other two be the bottom cards of the pack, which you are to draw in
the manner before described.

The Fifteen Thousand Livres.


You must be prepared with two cards like the following:—

and with a common ace and five of diamonds. The five of diamonds,
and the two prepared cards, are to be disposed thus:—

and, holding them in your hand, you say,—“A certain Frenchman left
fifteen thousand livres, which are represented by these three cards,
to his three sons; the two youngest agreed to leave their 5000, each
of them, in the hands of the elder, that he might improve it.” While
you are telling this story, you lay the five on the table, and put the
ace in its place, and at the same time artfully change the position of
the other two cards, that the three cards may appear as in the
following figure:—

You then resume your discourse. “The eldest brother, instead of


improving the money, lost it all by gaming, except three thousand
livres, as you here see.” You then lay the ace on the table, and,
taking up the five, continue your story. “The eldest, sorry for having
lost the money, went to the East Indies with these 3000, and
brought back 15,000.” You then show the cards in the same position
as at first. To render this deception agreeable, it must be performed
with dexterity, and should not be repeated, but the cards
immediately put in the pocket; and you should have five common
cards in your pocket, ready to show, if any one should desire to see
them. Another recreation of this sort may be performed with fives
and threes, as follows:—
The Magic Ring.
Make a ring large enough to go on the second or third finger, in
which let there be set a large transparent stone, to the bottom of
which must be fixed a small piece of black silk, that may be either
drawn aside or expanded by turning the stone round. Under the silk
is to be the figure of a small card. Then make a person draw the
same sort of card as that at the bottom of the ring, and tell him to
burn it in the candle. Having first shown him the ring, you take part
of the burnt card, and, reducing it to powder, you rub the stone with
it; and, at the same time, turn it artfully round, so that the small
card at bottom may come in view.

The Card in the Mirror.


Provide a mirror, either round, like the following figure,
or oval; the frame of which must be at least as wide as a card. The
glass in the centre must be made to move in the two grooves, C D
and E F; and so much of the silvering must be scraped off as is
equal to the size of a common card. Observe that the glass be
likewise wider than the width of the card. Then paste over the part
where the quicksilver is rubbed off a piece of pasteboard, on which
affix a card that exactly fits the space, which must at first be placed
behind the frame. This mirror must be placed against a partition,
through which are to go two strings, by which an assistant in the
adjoining room can easily move the glass in the grooves, and
consequently make the card appear or disappear at pleasure.
Matters being thus prepared, you contrive to make a person
draw the same sort of card with that fixed to the mirror, and place it
in the middle of the pack: you then make the pass, and bring it to
the bottom: you then direct the person to look for his card in the
mirror, when the confederate, behind the partition, is to draw it
slowly forward, and it will appear as if placed between the glass and
the quicksilver. While the glass is being drawn forward, you slide off
the card from the bottom of the pack, and convey it away. The card
fixed to the mirror may easily be changed each time the experiment
is performed. This recreation may also be made with a print that has
a glass before it, and a frame of sufficient width, by making a slit in
the frame, through which the card is to pass; but the effect will not
be so striking as in the mirror.

The Marvellous Vase.


Place a vase of wood or pasteboard, like the following:—
A B, on a bracket L, to the partition M.

Let the inside of this vase be divided into five parts, c, d, e, f, g;


and let the divisions c and d be wide enough to admit a pack of
cards, and those of e, f, g, one card only. Fix a thread of silk at the
point H, the end of which, passing down the division d, and over the
pulley I, runs along the bracket L, and goes out behind the partition
M. Take three cards from a piquet pack, and place one of them in
each of the divisions, e, f, g, making the silk thread or line go under
each of them. In the division c put the pack of cards, from which
you have taken the three cards that are in the other divisions. Then
take another pack of cards, at the bottom of which are to be three
cards of the same sort with those in the three small divisions, and,
making the pass, bring them to the middle of the pack, and let them
be drawn by three different persons. Then give them all the cards to
shuffle, after which place the pack in the division d, and tell the
parties they shall see the three cards they drew come, at their
command, separately out of the vase. An assistant behind the
partition then drawing the line with a gentle and equal motion, the
three cards will gradually rise out of the vase. Then take the cards
out of the division c, and show that those three cards are gone from
the pack. The vase must be placed so high that the inside cannot be
seen by the company. You may perform this recreation also without
an assistant, by fixing a weight to the end of the silk line, which is to
be placed on a support, and let down at pleasure, by means of a
spring in the partition.

The Nerve Trick.


Having previously looked at a card, bid the person draw one,
taking care to show him that which you know; when he has it, let
him put it at the bottom; let him shuffle the cards, then look at them
again, and, finding the card, place it at the bottom; then cut them in
half; give the party that half which contains his chosen card at the
bottom, to hold between his finger and thumb, just at the corner;
bid him pinch them as tight as he can; then striking them pretty
sharply, they will all fall to the ground, except the bottom one, which
is the card he has chosen. This is a very curious trick, and, if cleanly
done, is really astonishing. It may be accounted for from the nature
of the nerves, which are always more retentive when any thing is
attempted to be taken, either by force or surprise.
To make the Constable catch the Knave.
Take a pack of cards, and look out the four knaves; lay one of
them privately on the top of the pack, and the other three down
upon the table, saying, “Here, you see, are three knaves got
together, about no good you may be sure;” then lay down a king
beside them, saying, “But here comes the constable and catches
them together: ‘Oh, says he, have I caught you? Well, the next time
I catch you together, I’ll punish you severely for all your rogueries.’
‘Oh,’ but say they, ‘you shan’t catch us again together in haste;’ so
they conclude to run three several ways. ‘Well, I’ll go here,’ says one
(so take one of the knaves, and put him at the top of the pack). ‘And
I’ll go here,’ says another (so put him at the bottom). ‘Then I’ll go
here,’ says a third (so put him in the middle). ‘Nay,’ says the
constable, ‘if you run, I’ll make sure of one; so I’ll follow the first.’”
Then take the king and put him at the top, and let any one cut the
cards asunder two or three times; then deal, cut the cards one by
one, and you shall find three together, and the constable with them.
Note.—This feat would be best done with a pack of cards that
has two knaves of that sort which you put in the middle.

To change a Card into a King or Queen.


To do this, you must have the picture in your sleeve, and, by a
swift sleight, return the card, and fetch out the picture with a back
bending. The manner of doing this is better learnt by frequent trials
than can be taught by many words. But, if you would do this feat,
and yet hold your hand straight and unmoved, then you must peel
off the spots or figure of a card, as thin as you can, and just fasten it
on the picture with something that will make it stick a little; then,
having shown the spots or figure of the card, you may draw it off,
and roll it up with your thumb into a very narrow compass, holding it
undiscovered, between the inside of the thumb and the ball of your
fore-finger; and so produce the picture, to the admiration of the
beholders.

To tell a Person what Card he took Notice of.


Take any number of cards, as ten, twelve, and then, holding
them with their backs towards you, open four or five of the
uppermost, and, as you hold them out to view, let any one note a
card, and tell you whether it be the first, second, or third from the
top; but you must privately know the whole number of those cards
you took. Now shut up your cards in your hands, and take the rest
of the pack, which place upon them; then knock their ends and sides
upon the table; so it will seem impossible to find the noted card, yet
it may easily be done, thus: subtract the number of cards you held
in your hand from fifty-two, the whole number in the pack, and to
the remainder add the number of the noted card; so the same shall
be the number of the noted card from the top; therefore take off the
cards one by one, smelling to them till you come to the noted card.

To tell what Card is at the Bottom, when the


Pack is shuffled.
When you have seen a card privately, or as though you marked
it not, lay the same undermost, and shuffle the cards till your card
be again at the bottom. Then show the same to the bystanders,
bidding them remember it. Now shuffle the cards, or let any other
shuffle them, for you know the card already, and therefore may, at
any time, tell them what card they saw, which, nevertheless, must
be done with caution or show of difficulty.
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about testbank and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebooksecure.com

You might also like