You are on page 1of 38

Java

00_JAVA_DEITEL(arxika).indd i

10/3/2010 1:10:55

00_JAVA_DEITEL(arxika).indd ii

10/3/2010 1:10:55

Java

Paul Deitel

Deitel & Associates, Inc.

Harvey Deitel
Deitel & Associates, Inc.

, MSc Computer Science

: .
70-74 - .: 210 3630219
106 81 , 2010
www.mgiurdas.gr

00_JAVA_DEITEL(arxika).indd iii

10/3/2010 1:10:55

:
JavaTM How to Program Eighth Edition
ISBN 0-13-605306-8
Copyright 2010 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458


:
70-74 - .: 210 3630219
106 81 , 2010
www.mgiurdas.gr

ISBN: 978-960-512-592-9

:
Desktop Publishing: . , .: 210 2811662
: .., .: 210 3300067
:

, ,
,
.

00_JAVA_DEITEL(arxika).indd iv

10/3/2010 1:10:55


Kristen Nygaard, Simula,

.
Paul Harvey Deitel

00_JAVA_DEITEL(arxika).indd v

10/3/2010 1:10:55

00_JAVA_DEITEL(arxika).indd vi

10/3/2010 1:10:55

xxi
xxxv

, Internet World Wide Web

1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
1.12
1.13
1.14
1.15
1.16

2
3
4
5
6
6
7
8
8
9
10
11
11
14
15

1.17
1.18
1.19
1.20

:


, Client/Server
Internet World Wide Web
, Assembly
C C++
Java
Java
Fortran, COBOL, Pascal Ada
BASIC, Visual Basic, Visual C++, C# .NET
Java
Java
Java
:
UML
Web 2.0

Web

Java

37

2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9

Java:
Java
printf
:

38
38
44
46
47
52
53
56
60

00_JAVA_DEITEL(arxika).indd vii

20
24
25
26
26

10/3/2010 1:10:55

viii

Java

72

3.1
3.2
3.3

73
73

3.10

, ,



, set get


double
() :

: 1

106

4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
4.10
4.11
4.12
4.13
4.14

107
107
108
108
110
111
116
117
122
129
134
135
138

4.15


if
ifelse
while
:
:
:



() :

: 2

156

5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.10

157
157
159
162
167
169
176
178
184

5.11


for
for
dowhile
switch
break continue


() :

202

6.1
6.2
6.3
6.4

Java
static, static Math

203
203
205
207

3.4
3.5
3.6
3.7
3.8
3.9

00_JAVA_DEITEL(arxika).indd viii

75
78
82
87
88
91
95
98

138
142

189
192

10/3/2010 1:10:55


6.5
6.6
6.7
6.8
6.9

ix
210
211
212
213
215
219
220
220
225
228

6.14




Java API
:
6.9.1

6.9.2

:


() :

248

7.1
7.2
7.3
7.4
7.5
7.6
7.7
7.8

249
250
251
252
261
264
266

7.16



:
for

: GradeBook


: GradeBook


Arrays
ArrayList
() :

316

8.1
8.2
8.3
8.4
8.5
8.6

Time

this
Time:


Set Get

finalize
static
static Import
final
Time:

317
317
321
322
325

6.10
6.11
6.12
6.13

7.9
7.10
7.11
7.12
7.13
7.14
7.15

8.7
8.8
8.9
8.10
8.11
8.12
8.13
8.14
8.15

00_JAVA_DEITEL(arxika).indd ix

231
234

269
274
278
284
285
287
289
292
295

330
331
332
335
338
338
342
343
346
351

10/3/2010 1:10:55

x
8.16

Java

8.17

() :

352
356

365

9.1
9.2
9.3
9.4

9.9

366

367
protected
369

370
9.4.1
CommissionEmployee
370
9.4.2
BasePlusCommissionEmployee
375
9.4.3

CommissionEmployeeBasePlusCommissionEmployee
380
9.4.4
CommissionEmployeeBasePlusCommissionEmployee
protected
383
9.4.5
CommissionEmployee-BasePlusCommissionEmployee
private
386

390

391
Object
392
() :

394

396

10

400

10.1
10.2
10.3
10.4
10.5




:
10.5.1 Employee
10.5.2 SalariedEmployee
10.5.3 HourlyEmployee
10.5.4 CommissionEmployee
10.5.5 BasePlusCommissionEmployee
10.5.6 , instanceof
10.5.7

final
:
10.7.1 Payable
10.7.2 Payable
10.7.3 Invoice
10.7.4 Employee Payable
10.7.5 SalariedEmployee Payable
10.7.6 Payable Invoice
Employee
10.7.7 Java API
() :

401
403
404
406
408
409
412
414
415
417
418

9.5
9.6
9.7
9.8

10.6
10.7

10.8
10.9

00_JAVA_DEITEL(arxika).indd x

423
423
424
426
427
427
430
431
433
435
436
438

10/3/2010 1:10:55

xi

11

443

11.1
11.2
11.3
11.4
11.5
11.6
11.7
11.8
11.9
11.10
11.11
11.12
11.13
11.14


:
: ArithmeticException InputMismatchException

Java
finally

printStackTrace, getStackTrace getMessage


-

444
445
445
448
453
453
456
461
462
465
467
468
468
470

12

, 1: UML

476

12.1
12.2
12.3
12.4
12.5
12.6
12.7
12.8

477
477
485
491
496
500
506
513

13

, 2:

517

13.1
13.2
13.3

518
518
523

13.5

ATM
ATM
13.3.1 ATM
( )

13.4.1 ATM
13.4.2 Screen
13.4.3 Keypad
13.4.4 CashDispenser
13.4.5 DepositSlot
13.4.6 Account
13.4.7 BankDatabase
13.4.8 Account
13.4.9 BalanceInquiry
13.4.10 Withdrawal
13.4.11 Deposit
13.4.12 ATMCaseStudy

14

: 1

555

14.1
14.2

Nimbus Java

556
557

13.4

00_JAVA_DEITEL(arxika).indd xi

528
529
530
535
536
537
538
539
541
543
545
546
550
553
553

10/3/2010 1:10:55

xii
14.3
14.4
14.5
14.6
14.7
14.8
14.9
14.10

Java

14.19
14.20
14.21

/ GUI JOptionPane
Swing


GUI

JButton

14.10.1 JCheckBox
14.10.2 JRadioButton
JcomboBox
JList



JPanel


14.18.1 FlowLayout
14.18.2 BorderLayout
14.18.3 GridLayout

JTextArea

558
561
563
568
574
576
578
581
581
584
587
591
593
596
600
604
607
610
612
615
618
620
622
624

15

Java 2D

640

15.1
15.2
15.3
15.4
15.5
15.6
15.7
15.8
15.9




,


Java 2D API

641
643
644
651
656
660
662
665
672

16

681

16.1
16.2
16.3


String
16.3.1 String
16.3.2 String length, charAt getChars
16.3.3
16.3.4
16.3.5
16.3.6
16.3.7 String
16.3.8 String valueOf
StringBuilder
16.4.1 StringBuilder
16.4.2 StringBuilder length, capacity, setLength ensureCapacity

682
682
683
683
684
685
690
692
692
693
694
696
696
697

14.11
14.12
14.13
14.14
14.15
14.16
14.17
14.18

16.4

00_JAVA_DEITEL(arxika).indd xii

10/3/2010 1:10:55

xiii

16.5
16.6
16.7
16.8

16.4.3 StringBuilder charAt, setCharAt, getChars reverse


16.4.4 StringBuilder append
16.4.5 StringBuilder
Character

, Pattern Matcher

698
700
701
703
707
708
717

17

728

17.1
17.2
17.3
17.4
17.5

729
730
732
733
738
738
745
747
752
753

17.8
17.9



File

17.5.1
17.5.2
17.5.3 :
17.5.4

17.6.1

17.6.2
java.io
17.7.1 byte
17.7.2
JFileChooser

18

778

18.1
18.2
18.3
18.4
18.5
18.6
18.7
18.8
18.9
18.10


:
: Fibonacci



Fractal

779
780
781
784
787
789
790
792
803
803

19

811

19.1
19.2


19.2.1
19.2.2

19.3.1
19.3.2
19.3.3

812
813
813
817
822
822
826
830
836

17.6

17.7

19.3

19.4

00_JAVA_DEITEL(arxika).indd xiii

754
760
762
762
764
765
768

10/3/2010 1:10:55

xiv

Java

20

841

20.1
20.2
20.3
20.4
20.5
20.6

20.8
20.9
20.10
20.11
20.12
20.13
20.14
20.15
20.16


(Wrapper)

Collection Collections

20.6.1 ArrayList Iterator


20.6.2 LinkedList

20.7.1 sort
20.7.2 shuffle
20.7.3 reverse, fill, copy, max min
20.7.4 binarySearch
20.7.5 addAll, frequency disjoint
Stack java.util
PriorityQueue Queue

Properties


842
842
843
844
844
845
846
848
853
854
857
859
861
863
864
867
868
871
874
877
878
879
879

21

886

20.7

21.1
21.2
21.3
21.4


:
:

21.5
21.6
21.7
21.8 -
21.9 :
21.10

887
887
890

22

917

22.1
22.2
22.3
22.4
22.5
22.6
22.7
22.8

918
918
919
920
930
934
937
943

23

Applet Java Web Start

954

23.1
23.2

Applet JDK

955
956

00_JAVA_DEITEL(arxika).indd xiv

893
896
896
904
908
912
913

10/3/2010 1:10:56

xv

23.3

Java Applet: String


23.3.1 WelcomeApplet appletviewer
23.3.2 Applet Web Browser
Applet
init
Sandbox
Java Web Start Java Network Launch Protocol (JNLP)
23.7.1 DrawTest Applet Java Web Start
23.7.2 JNLP DrawTest Applet

960
962
964
964
965
967
968
969
970
974

24

: Applet

980

24.1
24.2
24.3
24.4
24.5
24.6
24.7
24.8

,



Java Media Framework

Web

981
982
988
994
997
1000
1005
1005

25

GUI: 2

1013

25.1
25.2
25.3
25.4
25.5
25.6
25.7
25.8
25.9
25.10

JSlider
:

JPopupMenu

JDesktopPane JInternalFrame
JTabbedPane
: BoxLayout GridBagLayout

1014
1014
1018
1019
1027
1030
1034
1038
1040
1052

26

1058

23.4
23.5
23.6
23.7
23.8

26.1
26.2
26.3
26.4

:


26.4.1 Runnable Thread
26.4.2 Executor
26.5
26.5.1
26.5.2
26.6 /
26.7 /: ArrayBlockingQueue
26.8 /
26.9 /: Buffer
26.10 /: Lock Condition
26.11 GUI
26.11.1 Worker
26.11.2 SwingWorker

00_JAVA_DEITEL(arxika).indd xv

1059
1061
1063
1065
1065
1068
1069
1070
1074
1078
1085
1088
1094
1101
1108
1109
1115

15/3/2010 11:19:07

xvi

Java

26.12 Callable Future


26.13

1122
1122

27

1131

27.1
27.2
27.3
27.4
27.5
27.6
27.7
27.8
27.9
27.10

URL
' Web


/
/ Datagram
/
[ Web] : DeitelMessenger

1132
1133
1138
1141
1143
1144
1156
1163
1178
1178

28

JDBC

1184

28.1
28.2
28.3
28.4

28.9
28.10
28.11
28.12
28.13
28.14
28.15


: books
SQL
28.4.1 SELECT
28.4.2 WHERE
28.4.3 ORDER BY
28.4.4 : INNER JOIN
28.4.5 INSERT
28.4.6 UPDATE
28.4.7 DELETE
MySQL MySQL Connector/J
MySQL
books MySQL
JDBC
28.8.1
28.8.2 books
RowSet
Java DB/Apache Derby
PreparedStatement

Web

1185
1186
1187
1190
1191
1192
1193
1195
1196
1197
1198
1199
1200
1200
1201
1201
1206
1218
1220
1222
1237
1237
1238
1238

29

JavaServer Faces Web

1247

29.1
29.2
29.3
29.4

HTTP

Web Java
29.4.1 Servlets
29.4.2 JavaServer Pages
29.4.3 JavaServer Faces
29.4.4 Web NetBeans

1248
1249
1252
1253
1253
1254
1255
1256

28.5
28.6
28.7
28.8

00_JAVA_DEITEL(arxika).indd xvi

10/3/2010 1:10:56


29.5

xvii
1256
1257
1259
1261
1262
1269
1269

29.8

NetBeans
29.5.1 JSP
29.5.2 Page Bean
29.5.3
29.5.4 Web NetBeans
JSF
29.6.1
29.6.2 Validator
Validator

29.7.1 Cookie
29.7.2 Bean

30

Web JavaServer Faces Ajax

1313

30.1
30.2

1314
1314

30.5

Web
30.2.1 Web

30.2.2 Page Bean AddressBook
JSF Ajax


30.4.1
30.4.2 JSP and

30.4.3 '
30.4.4

1331
1335
1337
1339

31

Web

1343

31.1
31.2
31.3
31.4
31.5
31.6

Web
Simple Object Access Protocol (SOAP)
Representational State Transfer (REST)
JavaScript Object Notation (JSON)
Web SOAP
31.6.1 Web
Web NetBeans
31.6.2 Web WelcomeSOAP NetBeans
31.6.3 Web WelcomeSOAP NetBeans
31.6.4 Web WelcomeSOAP Tester
GlassFish
31.6.5 Web Web Service Description
Language (WSDL)
31.6.6 Web
WelcomeSOAP
31.6.7 Web WelcomeSOAP
XML Web REST
31.7.1 XML Web Service REST
31.7.2 XML Web REST

1344
1346
1346
1347
1347
1347

29.6

29.7

30.3
30.4

31.7

00_JAVA_DEITEL(arxika).indd xvii

1273
1281
1283
1294
1303

1315
1324
1327
1329
1329

1348
1348
1350
1351
1353
1353
1356
1358
1358
1362

10/3/2010 1:10:56

xviii

Java

31.8

JSON Web REST


31.8.1 JSON Web REST
31.8.2 JSON Web REST
31.9 Web SOAP
31.9.1 Web Blackjack
31.9.2 Web Blackjack
31.10 Web SOAP

31.10.1 Reservation
31.10.2 Web
Reservation
31.11 :
31.11.1 XML Web EquationGenerator REST
31.11.2 XML Web EquationGenerator REST
31.11.3 JSON Web EquationGenerator REST
31.11.4 JSON Web EquationGenerator REST
31.12

1363
1364
1365
1367
1368
1372

1411

ASCII

1413

1414

1415

Java API

1416

E.1
E.2

Java API

1416
1417

(F) Debugger

1425

.1
.2
.3
.4
.5
.6
.7

1426
1426
1430
1432
1435
1438
1440

run, stop, cont print


print set
step, step up next
watch
clear

1383
1383
1386
1391
1394
1395
1398
1399
1402

(G)

1442

.1
.2
.3
.4
.5
.6
.7
.8
.9
.10

1443
1443
1443
1444
1445
1447
1448
1450
1452
1454

printf






printf

00_JAVA_DEITEL(arxika).indd xviii

10/3/2010 1:10:56


.11
.12
.13
.14



Formatter

Web
HQ PDF online.
(. .
)

H () Number Systems
H.1
H.2
H.3
H.4
H.5
H.6

Introduction
Abbreviating Binary Numbers as Octal and Hexadecimal Numbers
Converting Octal and Hexadecimal Numbers to Binary Numbers
Converting from Binary, Octal or Hexadecimal to Decimal
Converting from Decimal to Binary, Octal or Hexadecimal
Negative Binary Numbers: Twos Complement Notation

xix
1457
1458
1458
1460

1465

I
II
V
VI
VI
VII
IX

I () GroupLayout

XIV

I.1
I.2
I.3
I.4

XIV
XIV
XV
XXV

Introduction
GroupLayout Basics
Building a ColorChooser
GroupLayout Web Resources

J () Java Desktop Integration Components (JDIC)

XXVI

J.1
J.2
J.3
J.4
J.5
J.6

XXVI
XXVI
XXVIII
XXX
XXXI
XXXI

Introduction
Splash Screens
Desktop Class
Tray Icons
JDIC Incubator Projects
JDIC Demos

K () Mashups

XXXII

K.1
K.2
K.3
K.4
K.5
K.6

XXXII
XXXII
XXXIII
XXXIV
XXXV
XXXV

Introduction
Popular Mashups
APIs Commonly Used in Mashups
Deitel Mashups Research Center
Deitel RSS Resource Center
Mashup Performance and Reliability Issues

L () Unicode

XXXVI

L.1
L.2
L.3
L.4
L.5
L.6

XXXVI
XXXVII
XXXVIII
XXXIX
XXXIX
XLI

Introduction
Unicode Transformation Formats
Characters and Glyphs
Advantages/Disadvantages of Unicode
Using Unicode
Character Ranges

M () Creating Documentation with javadoc


M.1
M.2

Introduction
Documentation Comments

00_JAVA_DEITEL(arxika).indd xix

XLIII
XLIII
XLIII

10/3/2010 1:10:56

xx

Java

M.3
M.4
M.5

Documenting Java Source Code


javadoc
Files Produced by javadoc

N () Bit Manipulation
N.1
N.2
N.3

Introduction
Bit Manipulation and the Bitwise Operators
BitSet Class

O () Labeled break and continue Statements


O.1
O.2
O.3

Introduction
Labeled break Statement
Labeled continue Statement

P () UML 2: Additional Diagram Types


P.1
P.2

Introduction
Additional Diagram Types

Q () Design Patterns
Q.1
Q.2

Q.3

Q.4
Q.5

Q.6
Q.7

Introduction
Creational, Structural and Behavioral Design Patterns
Q.2.1
Creational Design Patterns
Q.2.2
Structural Design Patterns
Q.2.3
Behavioral Design Patterns
Q.2.4
Conclusion
Design Patterns in Packages java.awt and javax.swing
Q.3.1
Creational Design Patterns
Q.3.2
Structural Design Patterns
Q.3.3
Behavioral Design Patterns
Q.3.4
Conclusion
Concurrency Design Patterns
Design Patterns Used in Packages java.io and java.net
Q.5.1
Creational Design Patterns
Q.5.2
Structural Design Patterns
Q.5.3
Architectural Patterns
Q.5.4
Conclusion
Design Patterns Used in Package java.util
Q.6.1
Creational Design Patterns
Q.6.2
Behavioral Design Patterns

00_JAVA_DEITEL(arxika).indd xx

XLIV
LI
LII

LV
LV
LV
LXV

LXIX
LXIX
LXIX
LXX

LXXII
LXXII
LXXII

LXXIV
LXXIV
LXXV
LXXVI
LXXVIII
LXXIX
LXXX
LXXX
LXXX
LXXXI
LXXXIII
LXXXVI
LXXXVI
LXXXVIII
LXXXVIII
LXXXVIII
LXXXIX
XCI
XCII
XCII
XCII
XCIII

1466

10/3/2010 1:10:56


, .
Edgar Morgan Foster
Java Java , ! , , .
Deitel " " (live-code approach)

Java, .
. www.
deitel.com/books/jhtp8/.
Deitel & Associates,
Pearson/Prentice Hall, '
Web 2.0 .
Java
. .


' :
,
.
Java Standard Edition 6 Update 11
Java.
" " .
, , .

. ,

.
. '
Web
. 34 " ":
:

00_JAVA_DEITEL(arxika).indd xxi








"FairTax"

10/3/2010 1:10:56

xxii

Java
Computer-Assisted Instruction
Computer-Assisted Instruction:

Computer-Assisted Instruction:

Computer-Assisted Instruction:
Computer-Assisted Instruction:


:
Ecofont
:





SMS
Phishing Scanner
:

:

: Simbad
Web
Web SMS
Web

/UML 2 (ATM) (12 13) ATM


. ATM
. , 110. .
,
. ATM . 12 13 . , 2 8, 10 ' .
' ,
12 13,
.
,

.
. 1.
3.
" "
.
.
ArrayList 7.
,
, Java API.
. , .
Java Web Start Java Network Launch Protocol (JNLP),
applet Web browser. ,
.
, applet -

00_JAVA_DEITEL(arxika).indd xxii

10/3/2010 1:10:56

xxiii

sandbox Java,
Internet.
.
( xxx) , .
online
.
Deitel Resource Centers Java
www.deitel.com/ResourceCenters.html.
7 Arrays ArrayList
. .
BigInteger
18.
,
, (
90 ),
.
StringTokenizer String
split ' . StringTokenizer ,
.

.
.
24 .
, , Java.
.
, , e-mail deitel@
deitel.com. . '
Java,
Deitel, www.deitel.com. www.deitel.com/newsletter/subscribe.html
Deitel Buzz Online Java
Resource Centers www.deitel.com/ResourceCenters.html.
Resource Centers .


:
ACM/LIEEE Computer Science
Advanced Placement Examination.

Time, Employee GradeBook, , .

00_JAVA_DEITEL(arxika).indd xxiii

10/3/2010 1:10:56

xxiv

Java

GUI
,
, 14, 15 25 .
UML (Unified Modeling Language)
.
Web .
28, JDBC 4
Java DB / Apache Derby MySQL.

JDBC 4.
29 30, JavaServer Faces (JSF)
Netbeans 6.5 Web
. 29 Web GUI,
, . 30
Ajax Web , JavaServer Faces.
Web

. Ajax
Web 2.0 . Ajax JSF
.
31,
Web SOAP REST. Web "21" (blackjack)
.
Web
. .
100 Resource Centers (www.deitel.com/resourcecenters.html)
.
Java SE 6, Java, Java Assessment and Certification, Java Design Patterns,
Java EE 5, Code Search Engines and Code, Game Programming, Programming Projects
. www.deitel.com/newsletter/subscribe.html
Deitel Buzz Online
Resource Center
.
, Web 2.0, Ajax, SaaS
(Software as a Service), Web , , , mashup,
, ..
26 [ Brian Goetz Joseph
Bowbeer, Java Concurrency in Practice, Addison-Wesley, 2006].
SwingWorker .
GroupLayout GUI
NetBeans IDE.

00_JAVA_DEITEL(arxika).indd xxiv

10/3/2010 1:10:56

xxv

JTable
JTable .
StringBuilder, StringBuffer
.
,
.

: UML 2.0
ATM
UML 2 . UML (
)
Java UML
.
( ) UML.
UML,
Rational ( UML) Object Management Group (
UML). ,
(ATM). 12 13 UML.
, UML 2, . , Java. 12 13
1 11.
1, . 12, ,
.
, ,
, ,
.
13, Java 12.

. , , UML ATM
. ' , , Java , ,
, , , , .

00_JAVA_DEITEL(arxika).indd xxv

10/3/2010 1:10:56

xxvi

Java

[:

.
].

()

1 ,
Internet & World Wide Web

3.9
4.14

5.10

2 Java

8 :

6.13

7.15

4 : 1

8.16

5 : 2
9
:

10 :

9.8

6 :

10.8

11

UML
12 () UML
13 ()


18 1

GUI, , Applet

14
: 1


16 ,

15 Java 2D

17 ,

23 Applet
Java Web Start

24 : Applet

26 2
27 3

25 GUI: 2

19 ,

20
21
22

Web

28

JDBC4
29 JSF Web

1.
2.

3.

30 Web
JavaServer Faces Ajax
4.
31 Web

00_JAVA_DEITEL(arxika).indd xxvi

18
14 15 GUI
.
26
14 GUI '
20-21
.
27
23
applet.

25 GUI
26 .
28
14 GUI '
.

10/3/2010 1:10:56

xxvii

. , .
111 1417
. 1213
UML. GUI Graphics Track
14, 15, 23, 24 25 GUI, . 1822 . 2627
Internet.
2831 Web .



. (deitel@
deitel.com). .


.

. . , , ' .

Live-Code , Live-Code.
Java,
.
. .
.

.
Helvetica (.. File)
Java (.. int x=5;).

Web. :
www.deitel.com/books/jhtp8

. .
. .
.

/. , , ,
. UML . UML , . UML OOD/UML 2 ATM.
. .

.

00_JAVA_DEITEL(arxika).indd xxvii

10/3/2010 1:10:57

xxviii

Java


, .

'
.

Java
.


.

.


, .

.

.

.
,
.

. .
, .
. . .
. .
.
. ' , , ,
, Java,
, Java
. , . [:
Resource Center Pearson Instructor.
.

00_JAVA_DEITEL(arxika).indd xxviii

10/3/2010 1:10:57

xxix

Pearson].
Programming Projects Resource Center (http://www.deitel.com/ProgrammingProjects/)
.

.
.

'
Java ,
Java. Windows, '
Web CD. , '
Web. Java Standard Edition Development Kit (JDK) 6. JDK (
) Java Sun java.sun.com/javase/downloads/index.jsp. Mac OS
Java developer.apple.com/java. , Netbeans IDE. Netbeans JDK
Java Sun, www.netbeans.
org/downloads/index.html. Eclipse IDE www.eclipse.
org/downloads/. MySQL dev.mysql.com/downloads/,
MySQL Connector/J dev.mysql.com/downloads/connector/j/5.1.html.
Java SE 6 Resource Center
:
www.deitel.com/JavaSE6Mustang/

CD
Microsoft Windows:
Java SE Development Kit (JDK) 6 Update 11
.
Eclipse IDE for Java EE Developers 3.4.1.
NetBeans IDE Version 6.5 All Bundle.
MySQL 5.0 Community Server 5.0.67.
MySQL Connector/J 5.1.7.
Netbeans Eclipse (IDE)
Java. MySQL MySQL Connector/J
2831. Web
, .
CD Deitel & Associates, Inc.,
Pearson. ' Web browser
' .

Java Multimedia Cyber Classroom, 8/e


, Web,
Java Multimedia Cyber Classroom, 8/e
Pearson. Cyber Classroom '
111

00_JAVA_DEITEL(arxika).indd xxix

10/3/2010 1:10:58

xxx

Java

14 17, ' , .. Web Cyber Classroom ,


www.prenhall.com/deitel/cyberclassroom/

Cyber Classroom.
Cyber Classroom ,
.
Cyber Classroom.


Instructors Resource Center Pearson
Solutions Manual ( )
,
Test Item File ( )

PowerPoint , .
.
, Pearson www.pearsonhighered.com/educator/replocator.

AP
AP Computer Science
AP.

Deitel Buzz Online E-mail


, Deitel Buzz Online Resource Center ,
,
, , , ,
.. '
. ,
www.deitel.com/newsletter/subscribe.html

Deitel Online Resource Center


www.deitel.com 100 Resource
Center , , Web 2.0, Internet Resource Center
www.deitel.com/
ResourceCenters.html. Resource Center
. online, , , , , blog,
podcast, , , , e- .. .
Resource Center , Deitel
Buzz Online (www.deitel.com/newsletter/subscribe.html). Resource Center
Java SE 6, Java, Java Assessment

00_JAVA_DEITEL(arxika).indd xxx

10/3/2010 1:10:58

xxxi

and Certification, Java Design Patterns, Java EE 5, Code Search Engines and Code Sites, Game Programming,
Programming Projects .

, , , ,
. Deitel & Associates, Inc. ' Abbey Deitel Barbara Deitel.
Honors Internship Program
Nicholas Doiron, Electrical and Computer
Engineer Carnegie Mellon University Matthew Pearson, Computer Science
Cornell University.
'
Pearson. Marcia Horton,
Engineering and Computer Science Pearson. Carole Snyder Dolores
Mars . Francesco Santalucia ( )
Kristine Carney Pearson
. Scott Disanno Robert Engelhardt
. Erin Davis
Margaret Waples .


. ' ,
:
Sun Microsystems:
Lance Andersen
Soundararajan Angusamy
Lawrence Prem Kumar
Simon Ritter
Sang Shin
Alexander Zuev

William E. Duncan (Louisiana State University)
Diana Franklin (University of California, Santa Barbara)
Edward F. Gehringer (North Carolina State University)
Ric Heishman (George Mason University)
Patty Kraft (San Diego State University)
Manjeet Rege, Ph.D. (Rochester Institute of Technology)
Tim Margush (University of Akron)
Sue McFarland Metzger (Villanova University)
Shyamal Mitra (The University of Texas at Austin)
Timothy Powers (University of Alaska)
Susan Rodger (Duke University)
Amr Sabry (Indiana University)
Monica Sweat (Georgia Tech)

00_JAVA_DEITEL(arxika).indd xxxi

10/3/2010 1:10:58

xxxii

Java


Joseph Bowbeer ()
Peter Pilgrim (Lloyds TSB)
Jos Antonio Gonzlez Seco ( )
S. Sivakumar (Astra Infotech Private Limited)
Raghavan Rags Srinivas (Intuit)
Vinod Varma (Astra Infotech Private Limited)
, ! Java
.
. , ,
, . :
deitel@deitel.com

, :
www.deitel.com/books/jHTP8/

, !
Paul J. Deitel
Dr. Harvey M. Deitel


Paul J. Deitel, CEO Chief Technical Officer Deitel & Associates, Inc.,
Sloan School of Management , Information Technology.
Java Certified Programmer Java Certified Developer Sun Microsystems
Java Champion. Deitel & Associates, Inc., Java,
C, C++, C#, Visual Basic Internet , Cisco, IBM, Sun Microsystems,
Dell, Lucent Technologies, Fidelity, NASA Kennedy, the National Severe Storm
Laboratory, White Sands Missile Range, Rogue Wave Software, Boeing, Stratus, Cambridge Technology
Partners, Open Environment Corporation, One Wave, Hyperion Software, Adra Systems, Entergy, CableData
Systems, Nortel Networks, Puma, iRobot, Invensys . Java C++
Boston Chapter of the Association for Computing Machinery.
Dr. Harvey M. Deitel, .
Dr. Harvey M. Deitel, Chairman Chief Strategy Officer Deitel & Associates, Inc., 48
,
. Dr. Deitel B.S. M.S. Ph.D. Boston University.
20 ,
Chairman of the Computer Science Department Boston College Deitel & Associates, Inc., Paul J. Deitel.
. , , ,
, , , , , , , ,
, , , , , Deitel
. Dr. Deitel
.

00_JAVA_DEITEL(arxika).indd xxxii

10/3/2010 1:10:58

xxxiii

Deitel & Associates, Inc.


Deitel & Associates, Inc., ,
Internet Web , Internet Web 2.0 Internet Business Initiative.
, Java, C++, C, Visual C#,
Visual Basic, Visual C++, XML, Python, , Internet Web
. Deitel & Associates, Inc., Paul J. Deitel Dr. Harvey M. Deitel.
, , . 33-
Prentice Hall/Pearson, Deitel & Associates, Inc., , , Cyber Classrooms, LiveLessons
DVD Web . Deitel & Associates, Inc.
e-mail :
deitel@deitel.com

Deitel & Associates, Inc.,


Dive Into Series ' , :
www.deitel.com/training/

e-mail Deitel Buzz Online :


www.deitel.com/newsletter/subscribe.html

Deitel, LiveLessons DVD


Web www.deitel.com.
, , Pearson. , www.prenhall.
com/mischtm/support.html#order.
online Deitel Resource Center :
www.deitel.com/resourcecenters.html

Deitel :
www.deitel.com/books/index.html

, ,
Pearson. ,
www.prenhall.com/mischtm/support.html#order

00_JAVA_DEITEL(arxika).indd xxxiii

10/3/2010 1:10:58

00_JAVA_DEITEL(arxika).indd xxxiv

10/3/2010 1:10:58

.
( ) Before You Begin

www.deitel.com/books/jhtp8/


(
) Java.
Helvetica (.. )
Java Courier ( System.
out.println()).


CD
AUTORUN.EXE ( CD Microsoft
Windows). CD ,
welcome.htm CD Student,
readme.txt CD. welcome.htm, Software
.
CD.
CD
Microsoft Windows:
Java SE Development Kit (JDK) 6 Update 11
.
Eclipse IDE for Java EE Developers 3.4.1.
NetBeans IDE Version 6.5 All Bundle.
MySQL 5.0 Community Server/v5.0.67.
MySQL Connector/J Version 5.1.7.
Netbeans and Eclipse (IDE)
Java. MySQL MySQL Connector/J
2831.
, .

00_JAVA_DEITEL(arxika).indd xxxv

10/3/2010 1:10:58

xxxvi

Java


CD Windows. ,
. Mac OS Java Mac

developer.apple.com/java/

Linux Java SE Development Kit


java.sun.com/javase/downloads/index.jsp


CD Windows.
.
software CD.
. ,
Java Standard Edition Development Kit (JDK) 6 Java, NetBeans ( JDK)
Eclipse. NetBeans 2931, Eclipse ' .
NetBeans Eclipse :
www.deitel.com/books/jhtp8/

,
,
IDE , Java,
debugger,
Java .


CD :

Netbeans JDK: java.sun.com/javase/downloads/index.jsp


Netbeans JDK: www.netbeans.org/downloads/index.html
Eclipse: www.eclipse.org/downloads/
MySQL Community Edition: dev.mysql.com/downloads/
MySQL Connector/J: dev.mysql.com/downloads/connector/j/5.1.html.



www.deitel.com/books/jhtp8/

, www.deitel.com
Register

00_JAVA_DEITEL(arxika).indd xxxvi

10/3/2010 1:10:58

xxxvii

. .
.
Deitel Buzz Online www.deitel.
com/newsletter/subscribe.html. , . www.deitel.com . deitel.com
.
, www.deitel.com Login .
www.deitel.com/books/jhtp8/. Examples
Examples.zip . , .
C:\Examples .
Examples.zip WinZip
(www.winzip.com) Windows XP Windows Vista (
).

PATH
PATH
,
Java ( javac java, ). Java
PATH.
PATH, JDK,
:
'java' is not recognized as an internal or external command,
operable program or batch file.

' , PATH
. JDK,
JDK PATH.

CLASSPATH
Java
Exception in thread "main" java.lang.NoClassDefFoundError:YourClass

CLASSPATH . ,
PATH, CLASSPATH, (.). Windows
.;

CLASSPATH ( ).
,
(:)

00_JAVA_DEITEL(arxika).indd xxxvii

10/3/2010 1:10:58

xxxviii

Java

Nimbus Java
Java SE 6 10, Java ,
Nimbus. ,
Nimbus .
Nimbus Java, swing.properties lib
JDK JRE.
:
swing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel


java.sun.com/javase/6/webnotes/install/index.html. [:
JRE, JRE JDK.
IDE JDK (.., NetBeans),
swing.properties lib jre].
Java. !

00_JAVA_DEITEL(arxika).indd xxxviii

10/3/2010 1:10:58

You might also like