0 ratings0% found this document useful (0 votes) 85 views12 pagesJava Unit-1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
yott-). :
) tr loin the — basic P Conca pa 9
wear ja? hw
Ar 1 Choss
a Object :
B Encapsulation,
4 (nhattance
ee Pelyrmcashtss
6 Dynanie Bradt
i Message Gonmaritattonal
Data Hiol
+ Vota Dbstraetion
Class mt Ekting “= cat ah dota ¢ code y an chject
7 IE 48a) User ‘defined data type -
“TE Creoctes 90-4 oljetr
oe
: Frutt is Claes Carga er ks on obed).
> aac
es smembes S ,
member funchons
g
& 7. ret a” stance, s. ae
i eHENS OL bute ruatine enti
‘ ey
4 aerate She wrap g¢ a data & Penttion,
: Sigh etek HE 0" Ange watt:4) \nhevitance Aequatng (We Properties nom one Clon
“to muother Class -
classy tls p extends 4
4
§ 4
5) Polynerphtem:- Duty to Aoke mop vom One” prim.
ex Function Overloadig (Haw! home ‘foo Clow fin
ma sum (Wwe x, Int ¥) :
t
q y A ‘ an
6) Qynanic_Bh ding - i ‘ Pate a
es Birding = Gomepile, Ttme > © -
3 Depot, Bindeg, Rurtine-» Virtuo
'
) Msoge Conmasicetont + The’ cet shyt
t Communiae Ul'th
, Loch, other. *
QD...
§) Dox. Hidteg s- In tng Class COW be arccerse
ke functions % Aare’ cle: -
4) Dora Aestocton ‘wet the ‘ Owa dakotype ,
es tech gue $F Ceatiy Nei data type -
only tn9) Tove Feature. -
a 1) Compiled 4 Interpreter’
2) plotfown Inclependent 4 portable
3) Dijeck Oriented: ’
4) Robust | tecuve
5) Distributed
9 simple fall ¢ faniltor ivi
4) Mult thcods ie
3) High Performance a
Y Dynamic § gx tensablo.
) Compe & toterpreter --Convets the Source Code into
Byte Code With the help 4 Conatsley,
~ Bak Convért&’ the “Byte Conde nto, Extertablecede
With the “help” + lukerpreter:
a) Platform ‘ndepeiclent &-Portouble + Foye Pre gram ean be
Easily. mand From One “Computer +o Orather (ouput
2) Chject ontented 5- Tove language a truly object Oiented
eer 1 = yd
4) Robust & Seure +
5) Distiibwhed + Shaye’ siigle "prgect to ‘difeont Program
: Molli- threading ac Howe livy Mull tasks “Aimullareonsly .
a High Pefomance :- Tone. {ication Spool i Mel,
oa Progronns ea :
. ith
- Dynonic & Extendibles- Chay (Horalites ace Unbed unS. Datatype: ,
* aE : = :
~ Species the types 4 & Vaaiobles
Datatpn Aivided Into two dertertypes
G imi ive
jte Primi tive
Niunease Non - Aumeate
Sa Ry Charactes Boolean
Shet- 2 chor OS :
byte-t e :
yer ¢
Yeeg -
Clases Interface onmys
Typs- Gf Dako types: -
: By Booleon — tbit ..
a
Char— abyty chor Sort — ous
agate SRM = ates yl byte
Clouble — “8 bubey
Be U, re long @ byte;
Tt + bytey } | Pi
+ bong j Bipytey & spricns pr
byt - byte ’
Short - > bytey. s
Suntox:- Dae Vauiable meme = Value’:
mt X19,
» Float «Pe ai, edb!
ches 4) vt "ee
cee oe
_ ers Te
as5) Joyo brogrocmng Structure ;- ,
% Documentation section eg Stal lomnieng
space Package stafemint’ - Creates | the- om
! Inport gal - teapot the Pre Abine Py
Interfoce Stetement -
uA Class Definitions
ee method class
}
gs method — dlettntton
ET U Fisk Pro ail
: ae Soanple — Upset
Kem: bud + pai :
, “yi rage Hlekone +o
Class Method
¥ stoic
fetd
Tava);
Output © Welcome to Tae6) operate ees
Peeformomce “wo Operands | Pres sosultt
‘
) Drithemade Operators ;- typ ST, y, '
O+b, 0-6, A¥b, o/b, ayb
3) Rabon cpemter :-
ach ach a alia ‘
o>b f ,
ath
ark
az-b
al=b q
3) Legical operator ;- $4 (Ano)
tM (oR)
! (nor)
nor
[+18]
perry
Fad.
QPitgomun’ Opuarer:- "=" tx. a
Varab|e sent
i Increaunt['Decrea ext |
a iS Pre | post: Inevemenfz es > pat
=~ pref Pest decrement} of. x peek
A++. pot 4A» pst Ex). oS
+L s
> fe Wand tad
ayr Conditional Qperouor i oe
4) Bitwis Operators :-
| 2 F Bitwie AND
t -. Bitwig + OR
A- Bitwis x-OR' ’ po dt
~~ Ons compliant
ef - WA (oft Operator,
>> = Right chitt operotoas a>
) Special _opeain
(Olnstance 4 exe
ICIS) .
se "
we ’
v :
e -
q . : i :
2 z 3
ate he
oe ¢ a
’ a
’
°
* i
f poe a SYBie Argument
a \e %S ON “nfomation that Hrecthy Aollows the Prcgrorn’s
nave on the Command [eno
@r)
uthen It is executed by wala Command Lines woe Con
Posses the Orygumenth »
Ene
Be puble clas op Pel
when IE 48 execucked «
Puble Static void trol (Sting ongs £3)
2
- (iat F =o, 7< oun¢syLengtn 5 tes)
a + Oude Pit ("ary Es’ trang (i
$SE ate
4 cu @ oom
peed ing 8 BY 4s oe wony rr Towa! Alan
Polpmenghtts ter ss
“
@ When a class has Wo ene, wore wetlers sly the Som
a fom fut defer “parameter. ‘
Be
Public Closs Overleader
ft
Pullic Nerd Sum ( én ay; Int b):
f x
Sy stern Out Printer (o.¢4); j
es) Rete te. nl WEA IEG 6300 200 :
E . 3
Pic ord sum Cat, Tid. b, tds 1
VD gree
Outs Piet, _enssaage
ublic Static Vold wpin (ig 22, ;
Orerloedar oe= new Overleader C);
Oe -Sum (10, 30);
Oe. Sum(s, 2,4);
= \OHO
utp ab: MD
OabtC= S+9tr
a ara
|, Oversidings -
q Soe
> \t means defining a method 'n Sub-clow oy
he Same stgeghure oh a dome. method ‘n Supe che
bx:
i ep nm one
public vold dip 0” ped
t .
2 out iit (Zam “om ee
$
Clos tio extend” one
v *
Public Word deep) TS
i
Syctem. Out: Pointe G Van Be tie ton" \or & its types sith Synttoc =
. Aa aivey 18 a collectten
Sholay typea cts
elements which hoy Conti: %
plow ernory location -
Ie Bam object which contatine stutter type of, data.
Java aryay mnberth® the Object: Cloy, tefl ements the
seializadle as votll os tuterfaces:
pee S61 ¢ q
ust
\obes
: aa iad giro 23 a digt q
There Ove ~hin. “type 4 Date’
. Stale Ditmengonal AN :
~ Muliidénenstenal finay pect *
D Sele imenionsl Spray
Syren date“pe Hee
Sr clay Testows i
— Static void main (Stig oats)
tnt AL]- new ‘nt [5]
aDr] - 10;
oy Cizoy ‘ca-lovath ; ++)
Syston: outs Print ln (ali);
so)| Myke - \aytienstoal Annoy 2 tm Towa s~
Data 1s Stora, fin YOu & en Patel
sgt, * ‘ :
» ebkyel Ieee és
&r “29 yates Be ee ‘
Nesp ait es . Le
a et ea pon (Sting cage cy
tw Onl J= § ya, abi"
fox Cink Sh, te, sth
*O5j 435 tea) §
fox se eates'e
| a
| & 4 Pel oorpanty ee aye
& 4 Phy 3;
S a
L
é oe