Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
JAVA

JAVA

Ratings: (0)|Views: 266|Likes:
Published by rotev

More info:

Published by: rotev on Dec 18, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/15/2014

pdf

text

original

 
Software Engineering FacultyJava Essentials & Programming  - Written By Aviad D
1
 
 
 
TABLE OF CONTENTS 
1.
 

JAVA

............................................................................................
7
 
1.1.
 

 

.......................................................................................................
7
 1.2. 

 

 

 
-
 
O
BJECT
O
RIENTED
P
ROGRAMMING
.....................................
8
 1.3. 

 

 
-
 
T
HE
T
HREE
OOP
 
P
RINCIPLES
.................................................
8
 
1.4.
 

 
-
 
 
E
NCAPSULATION
.........................................................................
9
 
1.5.
 

 
-
 
I
NHERITANCE
...............................................................................
10
 1.6. 

 

 
-
 
P
OLYMORPHISM
............................................................................
11
 
2.
 
, 
................................................................................
13
 
2.1.
 

 

 
 
C
ASTING
...................................................................................
13
 
2.1.1.
 
 
........................................................................................
13
 
3.
 

................................................................................................................
14
 
4.
 
    
.............................................................................
15
 
5.
 
 
....................................................................................................
17
 
5.1.
 

 

 

 

...............................................................................
19
 
5.2.
 

 

 

 

 

.............................................................
20
 
5.3.
 

 

 

 

...............................................................................
23
 
5.4.
 

 
DEFAULT
.................................................................................
23
 
5.5.
 

 

 
THIS
.........................................................................................
24
 
5.6.
 

 

 

..................................................................
26
 
5.7.
 

 
S
TATIC
..............................................................................................
27
 
5.8.
 

 
""
................................................................................................
27
 
6.
 
 
 
PACKAGES & INTERFACES.........................................
31
 6.1. 

 
 

 

 
-
 
PACKAGE
:
THE LIBRARY UNIT
.......................................
31
 
6.2.
 

 

 

 
 
C
REATING
U
NIQUE
P
ACKAGE
N
AME
......................
33
 
6.3.
 

 

 

 

..........................................................................
35
 
6.4.
 

 
 
IMPORT
 

 

 

 

 

...................................................
37
 
6.5.
 

 

..................................................................................................
39
 
6.5.1.
 
""
.................................................................................................
39
 
6.5.2.
 
 
-

Public
......................................................................
39
 
6.5.3.
 
" "
-
 
default package
The
....................................
40
 
6.5.4.
 
 

Private
......................................................................
41
 
6.6.
 

 

 
P
ROTECTED
..............................................................................
43
 
6.7.
 

 

 

..................................................................................
45
 
6.8.
 

 

.............................................................................................
46
 
7.
 

.................................................................................................................
48
 
7.1.
 

 
 

..........................................................................................
48
 
7.2.
 

 

 

 

 

 

 

 

 

......................................
52
 
7.3.
 

 

 
SUPER
().............................................................................
54
 
7.4.
 

 

 

 

...............................................................................
58
 
 
Software Engineering FacultyJava Essentials & Programming  - Written By Aviad D
2
 
7
.5
.
 

 

..................................................................................
61
 
7.6.
 

 

 
 
M
ETHOD
O
VERRIDING
....................................................
62
 
7.7.
 

 

 

...............................................................................
65
 
7.8.
 

 

 

...................................................................................
66
 
7.9.
 

 

 

..................................................................................
67
 
7.10.
 

 

 

.....................................................................................
69
 
7.11.
 

 
 
F
INAL
 

...............................................................................
73
 
7.11.1.
 
 
...........................................................................................
73
 
7.11.2.
 
 
...........................................................................................
74
 
7.12.
 

 

..........................................................................................
74
 
7.13.
 U
PCASTING
...............................................................................................
75
 
7.14.
 

 

 
 
U
PCASTING
.......................................................................
76
 
8.
 
 
 
POLYMORPHISM.....................................................................
77
 
8.1.
 

 
U
PCASTING
.......................................................................................
77
 
8.1.1.
 
      ?
.......................................................
78
 
8.2.
 

 
 
T
WIST
.............................................................................................
80
 
8.2.1.
 
   
..................................................................
80
 
8.3.
 

 

 

 

 
?
.....................................................................
81
 
8.3.1.
 

 
Extensibility
...........................................................................
84
 8.4. 

 
D
OWNCASTING
........................................................................................
87
 
8.5.
 

 
VS
 

.........................................................................................
89
 
9.
 
  
 
EXCEPTION HANDLING..............................................
90
 
9.1.
 

 
 
TRY
..............................................................................................
91
 
9.2.
 

 
 
CATCH
..........................................................................................
91
 
9.3.
 

 
 
THROW
.........................................................................................
93
 9.4. 

 
 
THROWS
..............................................................................................
94
 9.5. 

 
 
FINALLY
..............................................................................................
95
 
9.6.
 

 

 

.................................................................................
97
 
9.7.
 

 

 

 

..................................................................................
98
 
9.8.
 

 

 

..........................................................................................
101
 
9.9.
 

 

 

 

..................................................................................
103
 
9.10.
 

 

 

 

............................................................................
105
 
10.
 
/  
 
JAVA..........................................................................................
107
 
10.1.
 

 
 
S
TREAMS
...................................................................................
107
 
10.2.
 

 
F
ILE
..............................................................................................
110
 
10.3.
 

 
 
D
IRECTORIES
............................................................................
112
 
10.3.1.
 
  
...............................................................................
113
 
10.4.
 

 
S
TREAM
.......................................................................................
115
 
10.4.1.
 

 
InputStream
............................................................................
115
 
10.4.2.
 

 
OutputStream
.........................................................................
115
 
10.4.3.
 
 
 
FileInputStream
..............................................................
115
 
10.4.4.
 
 
 
FileOutputStream
...........................................................
117
 
10.4.5.
 

StringBufferInputStream
.......................................................
119
 
10.4.6.
 

BufferedInputStream
..............................................................
119
 
10.5.
 

 

 

...................................................................................
121
 
11.
 
 
STRING..............................................................................................
124
 11.1. 

 
 
S
TRING
......................................................................................
124
 
 
Software Engineering FacultyJava Essentials & Programming  - Written By Aviad D
3
 11.2. 

 
 
S
TRING
................................................................................................
126
 
11.3.
 

 
S
TRINGS
.......................................................................................
127
 
11.4.
 

 
S
TRING

 

 
 
TO
S
TRING
().....................................................
128
 
11.5.
 

 
S
TRINGS
......................................................................................
129
 
12.
 
  
 
JAVA UTILITIES...............................................................
131
 12.1. 

 
 
V
ECTOR
............................................................................................
132
 
12.2.
 

 

 
R
ANDOM
..........................................................................
135
 
12.3.
 

 

 
S
TACK
..............................................................................
137
 
13.
 

APPLET..............................................................................................
139
 
13.1.
 

 

 
 
B
ASIC
A
PPLET
.....................................................................
140
 
13.1.1.
 
 
applets
...................................................................................
140
 
13.1.2.
 

applets
....................................................................................
140
 
13.1.3.
 
  
....................................................................
141
 
13.2.
 

 
A
PPLET
........................................................................................
142
 
13.3.
 

 
A
PPLET
.................................................................................
143
 
13.4.
 

 
APPLETS
 

 

.........................................................................
144
 
13.5.
 

 
 
A
PPLETVIEWER
..........................................................................
145
 
13.6.
 

 
APPLETS
........................................................................................
145
 
13.7.
 

 
APPLET
 

 

 

..................................................................
146
 
13.8.
 

 

 

 
 
A
PPLET
......................................................................
147
 
13.9.
 

 

 
UPDATE
()........................................................................
147
 
13.10.
 

 

 
 
A
PPLET
....................................................................
148
 
13.11.
 

 

 

.............................................................................
149
 
13.12.
 

 

 

 

.........................................................................
153
 
14.
 

EVENT................................................................................................
154
 
14.1.1.
 
   
............................................................................
155
 
14.1.2.
 
   
..........................................................................
158
 
14.2.
 

 
HTML
 
&
 
A
PPLET
T
AGS
.................................................................
160
 
14.3.
 

 

 
 
A
PPLET
.........................................................................
161
 
14.4.
 

 

 
GET
C
ODE
B
ASE
()
 
 
GET
D
OCUMENT
B
ASE
().....................
163
 
14.5.
 

 

 
A
PPLET
C
ONTEXT
 

 
SHOW
D
OCUMENT
().................
164
 
15.
 
,    
AWT

SWING...........................................
165
 
15.1.
 

 
AWT..........................................................................................
165
 
15.2.
 

 

 

.................................................................................
165
 
15.2.1.
 

 -
 
Component
..............................................................................
166
 
15.2.2.
 

-
 
Container
..............................................................................
166
 
15.2.3.
 

-
 
Panel
........................................................................................
166
 
15.2.4.
 

-
 
Window
....................................................................................
166
 
15.2.5.
 

-
 
Frame
....................................................................................
166
 
15.2.6.
 
 
-
 
Canvas
................................................................................
166
 
15.3.
 

 

 

 

............................................................................
167
 
15.3.1.
 
   
Frame
:
.......................................................
167
 
15.4.
 

 
WINDOW_DESTROY...............................................................
168
 
15.5.
 

 

 

 

 
A
PPLET
..................................................................
169
 
15.6.
 

 

 

 

 

 

..................................................................
172
 
15.7.
 

 

 

.......................................................................................
176
 

Activity (6)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Walid_Sassi_Tun liked this
Bruno liked this
mensun liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->