图书介绍

Java 2考试指南 英文原版PDF|Epub|txt|kindle电子书版本网盘下载

Java 2考试指南 英文原版
  • (美)William Stanek著 著
  • 出版社: 北京:电子工业出版社
  • ISBN:7505374281
  • 出版时间:2002
  • 标注页数:568页
  • 文件大小:26MB
  • 文件页数:593页
  • 主题词:Java

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

Java 2考试指南 英文原版PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

Introduction1

PartⅠ Studying for the Programmer s Exam7

Chapter 1 Programmer Exam Roadmap8

What Is the Programmer Exam Like?8

What s on the Exam8

Declarations and Access Control9

Flow Control and Exception Handling9

Garbage Collection9

Language Fundamentals9

Operators and Assignments9

Overloading,Overriding Runtime Type,and Object Orientation10

Threads10

The java.awt Package-Layout10

The jave.lang Package10

The java.util Package10

The java.io Package11

How Does the Text Map to the Programmer Exam Objectives?11

How the Test Is Administered11

How to Sign up for and Take the Exams11

Test-Taking Tips for the Programmer Exam12

What the Test Program Looks Like for the Programmer Exam12

Be Careful!13

Take Your Time and Answer the Easy Ones First13

Beware of Tricks14

Understand Why the Question Is on the Test14

Know Your Test Center15

What Happens When You re Done?16

Sun s Take on Certification16

How Sun Manages the Certification Process16

Where Certification Is Heading17

Chapter 2 Java Programming Fundamentals18

Java Programming Concepts18

Objects18

Classes19

Packages19

Inheritance19

Encapsulation20

Access Controls20

Java s Characteristics21

Design for Distributed Networks22

Design for Multithreading22

Design for Ease of Use and Reuse22

Design for Security23

Working with Java Applets and Applications23

The Java Specification and the API23

Java1.124

Java2:JDK1.224

Java2:JDK1.325

Review Questions25

Answers to Review Questions26

Chapter 3 Java Keywords27

An Alphabetical List of All the Keywords27

Organizing Classes27

Defining Classes28

Keywords for Classes and Members28

Simple Data Types30

Values and Variables30

Exception Handing31

Instance Creation and Testing32

Control Flow32

Exerciese34

Exercise3-134

Exercise3-234

Exercise3-334

Answers to the Exercises34

Review Questions35

Answers to Review Questions36

Chapter 4 Java Building Blocks37

Identifiers37

Literals38

Boolean Literals38

Character Literals38

Exercise4-139

String Literals39

Exercise4-240

Integer Literals40

Floating-Point Literals41

Separators41

Operators41

Exercise4-342

Exercise4-443

Comments43

Answers to the Exercises44

Review Questions44

Answers to Review Questions46

Chapter 5 Memory and Garbage Collection47

Garbage Collection47

When Does an Object Become Eligible for Garbage Collection?48

Invoking the Garbage Collector48

Finalization49

Exercise5-149

Exercise5-249

Accessing Members50

Exercise5-351

Passing Parameters to a Method51

Exercise5-454

Forcing Garbage Collection55

Answers to the Exercises55

Review Questions57

Answers to Review Questions59

Chapter 6 Data Types and Vaues60

Data Types60

Variables and Data Types61

Primitive Data Types61

Integer Data Types62

Character Values63

Floating-Point Arithmetic64

Booleans65

Casting65

Exercises66

Exercise6.166

Exercise6.266

Exercise6.366

Arrays66

Declaring and Initializing Arrays67

One-Dimensional Arrays67

Initializing an Array When it is Allocated68

Exercise6.469

Arrays of Arrays69

Where Arrays Fit into the Class Hierarchy70

Answers to the Exercises71

Review Questions72

Answers to Review Questions73

Chapter 7 Operators74

Operators and Expressions74

Arithmetic Operators75

Assignment Operators77

Comparison Operators78

Logical Operators79

Bitwise Operators80

The >>Operator81

The >>>Operator82

The <<Operator83

The?,I,and?Operators84

Exercises85

Exercise7.185

Testing for an Object s Class Type85

Exercise7.286

equals() and==86

Exercise7.387

Exercise7.487

Operator Precedence and Evaluation Order87

Using Arrays in Expressions89

Using chars in Expressions89

Answers to the Exercises89

Review Questions92

Answers to Review Questions94

Chapter8 Control Flow96

Using if and if...else Statements96

if Statements96

if...eles Statements97

Nested if Statements97

Legal Values for if Statements98

Exercise8.198

Looping Expressions99

while Statements99

do-while Statements100

Legal Values for while and do-while Statements101

Iteration with for loops101

for Statements101

Controlling for Loops with Expressions102

Nested for Loops102

Switch and Case Statements103

switch case103

Nested switch case104

Using Jump Statements105

break105

continue105

labeled loops106

Exercise8.2108

Using ??and ‖109

Exercise8.3109

Answers to the Exercises109

Review Questions110

Answers to Review Questions111

Chapter9 Methods112

Defining Methods112

Methods Definitions112

Return Types113

Method Modifiers114

Exercise9.1116

Overloading a Method117

Exercise9.2118

Overriding a Method118

Access Control to Subclasses119

Inheriting Synchronized and Abstract119

Return Types119

Parameter Types120

Exceptions120

Exercise9.3120

Object References to Base and Derived Classes121

Answers to the Exercises122

Review Questions124

Answers to Review Questions125

Chapter10 Constructors126

Constructor Essentials126

The Default Constructor127

Defining,Overloading,and Overriding a Constructor128

Invoking Another Constructor130

Instance Variables in Constructors130

Exercise10.1132

Exercise10.2132

Exercise10.3133

Answers to the Exercises133

Review Questions134

Answers to Review Questions136

Chapter11 Objects and Classes137

Objects137

Creating and Destroying Objects138

Classes139

Declaring a Class139

Application Class Structures140

Applet Class Structures140

Class Variables143

Instance Variables144

Static Variables145

Predefined Instances145

null145

this145

super146

Object-Oriented Relationships Using‘is a’and ‘has a’146

Exercises148

Exercise11.1148

Exercise11.2148

Class Keywords148

public149

abstract149

strictfp150

final150

Exercise11.3151

Exercise11.4151

Variable Keywords151

static151

final151

transient152

volatile152

Exercise11.5152

Access Control Keywords152

public152

private153

protected153

Exercise11.6153

Exercise11.7154

Exercise11.8154

Exercise11.9154

Exercise11.10154

Casting Classes155

Inner Classes156

Creating Inner Classes156

Anonymous Classes160

Static Inner Classes161

Exercise11.11161

Answers to the Exercises162

Review Questions168

Answers to Review Questions171

Chapter12 Packages,Inheritance,and Interfaces172

Packages172

Declaring a Package172

The CLASSPATH Environmental Variable174

Import Statements174

Package Naming Conventions175

Using Packages176

Exercise12.1177

Exercise12.2177

Exercise12.3177

Exercise12.4178

Creating a Package178

Ordering of a Java Source File180

Exercise12.5180

Exercise12.6181

Inheritance182

Declaring Inheritance183

Using Inheritance184

Interfaces185

Using Interfaces185

Defining Interfaces186

Using the Cloneable Interface187

Exercise12.7188

Answers to the Exercises188

Review Questions190

Answers to Review Questions191

Chapter13 Passing Arguments to Programs192

The main() Method192

Command Line Arguments193

Exercise13.1194

When main() Ends195

Embedding an Applet in an HTML Page195

Passing Parameters to an Applet196

Retrieving Parameters197

Exercise13.2198

Customizing an Applet198

Answers to the Exercises201

Review Questions203

Answers to Review Questions204

Chapter14 Exceptions205

Exception Basics205

Working with Exceptions206

Uncaught Exceptions207

Checked and Unchecked Exceptions207

Using try,catch,and finally208

Exercise14.1209

Common Java Exceptions210

Using Methods Defined by Exception and Throwable211

Rethrowing an Exception211

Exercise14.2212

Which Exceptions a Method Can Throw213

Exceptions in an Overriding Method in a Subclass213

Exercise14.3214

Creating and Throwing an Exception214

Exercise14.4215

Answers to the Exercises215

Review Questions218

Answers to Review Questions223

Chapter15 Multithreading224

An Overview of Threads224

Thread States224

Thread Life Cycles225

Thread Scheduling and Priorities226

Creating Threads With java.lang.Thread and java.lang.Runnable227

Subclassing Thread227

Implementing Runnable229

Exercise15.1230

Monitors and Synchronization232

Understanding Synchronization232

Exercise15.2234

Using wait(),notify(),and notifyAll()234

Exercise15.3238

Managing Threads With Wait-Notify and Sleep238

Why a Thread Might Not Execute241

Exercise15.4242

Other Useful Thread Methods242

Answers to the Exercises242

Review Questions247

Answers to Review Questions248

Chapter16 Essential java.lang and java.util249

Wrapper Classes249

The Boolean Class249

The Character Class250

The Byte,Short,Integer,and Long Classes250

The Float and Double Classes251

Using Wrapper Classes251

Exercise16.1252

Working with the Math Class252

abs()252

ceil()253

floor()253

max()254

min()254

random()254

round()254

sqrt()255

sin()255

cos()255

tan()255

Exercise16.2255

The String and StringBuffer Classes255

String Operators255

The Immutability of Strings256

Methods of the String Class257

Exercise16.3258

String Buffers258

Exercise16.4259

Collections260

Overview of the Collections API260

Collection API Essentials262

Answers to the Exercises263

Review Questions264

Answers to Review Questions267

Chapter17 java.io268

The java.io Package268

InputStream and OutputStream269

FilterInputStream and FilterOutputStream269

DataInput and DataOutput271

Reader and Writer272

Working with Files273

Testing to See if a File Exists273

Finding Information about a File Node274

Deleting and Renaming Files274

Creating Directories274

Navigating the File System274

Creating Files274

Exercise17.1275

Creating Temporary Files275

Streams276

Sequencing Stream Filters276

Exercise17.2278

Reading and Writing Data Streams278

Encoded Text Streams279

Writing To and Reading From Files281

Exercise17.3282

Random Access Files282

File Descriptors284

Exercise17.4285

Using Buffered Readers to Read Text Input285

Using Print Writers to Write Text Output286

Answers to the Exercises288

Review Questions290

Answers to Review Questions291

Chapter18 java.awt:Graphics and Components293

The Abstract Windowing Toolkit(AWT)293

AWT Essentials295

Applets and AWT296

The paint() Method297

Repainting297

paint()and the Graphics Class298

Smoother Graphics298

Drawing Using a Graphics Object299

drawString()300

drawLine()300

drawRect(),fillRect()301

drawPolygon(),fillPolygon()302

drawArc(),fillArc()302

drawImage()304

Exercise18.1304

The Image Class304

Creating a Blank Image304

Loading or Transferring an Image305

Using an ImageObserver306

Exercise18.2308

Working with Frame Windows308

Constructing the Frame308

Sizing the Frame308

Setting the Frame Title309

Closing the Frame Window309

Creating a Frame Window in An Application310

Creating a Frame Window in An Applet311

How Java Arranges Components Within Containers313

The Component Class,Subclasses,and Methods313

TextArea313

TextField315

List315

Exercise18.3316

Key Component Methods317

Answers to the Exercises319

Review Questions321

Answers to Review Questions322

Chapter19 java.awt:Layout323

Components and Layout Managers323

Layout Manager Essentials323

Using Layout Managers324

FlowLayout324

BorderLayout326

GridLayout330

Other Types of Layout Managers332

Default Layout Managers332

Exercise19.1332

Answers to the Exercises333

Review Questions334

Answers to Review Questions335

Chapter20 java.awt:Event Handling336

Event Classes336

Listening for Events337

The Listener Interfaces339

ActionListener339

Interface Method339

AdjustmentListener340

ComponentListener340

ContainerListener340

FocusListener341

ItemListener341

KeyListener341

MouseListener341

MouseMotionListener342

TextListener342

WindowListener342

Implementing a Listener Interface343

Exercise20.1344

Semantic and Low-Level Events344

ActionEvent344

AdjustmentEvent344

ItemEvent345

AWTEvent Subclasses345

AWTEvent345

ActionEvent345

AdjustmentEvent346

ComponentEvent346

ContainerEvent346

FocusEvent346

InputEvent346

ItemEvent346

KeyEvent346

MouseEvent347

PaintEvent347

TextEvent347

WindowEvent347

Exercise20.2347

Extending Adapter Classes347

Exercise20.3348

Answers to the Exercises348

Review Questions351

Answers to Review Questions352

Chapter21 Sun Certified Programmer Practice Exam1353

Practice Exam Number1353

Questions353

Answers to Exam Questions374

Chapter22 Sun Certified Programmer Practice Exam2377

Practice Exam Number2377

Questions377

Answers to Exam Questions393

Chapter23 Sun Certified Programmer Practice Exam3396

Practice Exam Number3396

Questions396

Answers to Exam Questions416

PartⅡ Studying for The Developer s Exam419

Chapter24 Developer Exam Roadmap420

A Quick Overview420

Concepts You Should Know Before Getting Started421

The Programming Assignment421

The Essay Exam423

How to Sign Up For and Take the Exams424

How to Acquire the Programming424

Strategies for Approaching the Developer Assignment425

Chapter25 Developing with Java426

Styles and Conventions427

Identifiers427

Comments427

Error Handling427

Java s Documentation Problem428

javadoc429

Helping javadoc429

javadoc Tags432

Variables432

Classes434

Methods434

Rules for Using javadoc Comments and Tags435

Examples of javadoc Comments and Tags435

Abstract Classes438

Interfaces438

Grouping Behavior438

Enforcing Your API438

Identifying Intent439

Exercies25.1439

Packages439

Creating Packages439

Restricting Access440

Defining Subsystems440

Exercise25.2441

Defining Access Methods441

Exercise25.3443

Answers to the Exercises444

Review Questions446

Answers to Review Questions447

Chapter26 Accessing and Managing Databases448

Roll-Your-Own Databases449

Accessing Databases from Multiple Clients451

Two-Tiered and Three-Tiered Architectures452

Using Java APIs453

Remote Method Invocation453

Defining a Remote Interface454

Defining a Remote Class454

Defining the Class,Interface,and Constructor455

Installing the Security Manager and Registering the Bootstrap Naming Service458

Invoking Remote Objects459

Stubs and Skeletons461

Getting Things Going461

Exercise26.1462

JDBC462

The Need for Drivers462

Using ODBC463

Opening a Connection to a Database464

Interacting with a Database464

An Example of Using ODBC with Microsoft Access465

Exercise26.2466

Answers to the Exercises467

Review Questions468

Answers to Review Questions469

Chapter27 Network Programming and Communication470

ATCP/IP Primer470

Ports and Sockets472

Streams473

Designing Servers and Clients473

Handling Multiple Clients474

Client Issues475

The Networking Package476

InetAddress476

Socket and ServerSocket476

Internet Streams478

Client-Server Examples479

Writing a Single-Client Server in Java479

server()487

client()488

action()488

run()for SingleChatReceive488

Cleaning Up489

Writing a Multi-Client Server in Java489

server()494

run()494

broadcast()495

cleanUp()495

The Client495

Cleaning Up499

Exercise27.1499

Exercise27.2500

Uniform Resource Locator500

Answers to the Exercises501

Review Questions511

Answers to Review Questions512

Chapter28 Designing Application Interfaces513

Mix and Match!513

Using One Layout Manager514

Exercise28.1520

Changing Your Look520

Text520

Font and Color521

Replacing a Component521

Exercise 28.2521

Working with Frames522

Closing the Frame522

Making an Applet a Standalone Application523

Exercise28.3523

Answers to the Exercises523

Review Questions527

Answers to Review Questions528

Chapter29 Sun Certified Developer Practice Programming Assignment529

The Scenario529

The Prototype Specifications530

The Design Completed So Far530

The New Design532

The Code Completed So Far533

What You Will Add to the Code537

The Database538

The Server538

The Client538

The User Interface538

The Protocol538

Making a New Reservation539

Delete a Passenger s Reservation539

Finding a Passenger s Seat539

Finding All Open Seats539

Retrieving the List of Passengers539

What the User Interface Should Look Like when You re Done539

Updating the Passenger List541

Final Words of Advice541

One Possible Answer for the Client Side542

Client.java542

TopFrame.java545

EdnaUI.java545

NewPassenger.java548

DeletePassenger.java549

One Possible Answer for the Server Side551

Server.java(Including ClientServerThread)551

The Three Missing Methods from DB.java558

Chapter30 Sun Certified Developer Practice Essay Essay Exam560

Questions560

Answers561

PartⅢ Appendices563

AppendixA What s on the CD-ROM564

How the CD is Organized564

Source Code564

Sun s JDK564

Where to Find More564

What Is the Test Engine?565

Appendix B The JDK566

The Pieces of the JDK566

The Compiler566

The Runtime Environment for Stand-Alone Programs567

The Documentation Tool567

The Applet Viewer568

热门推荐