Professional Documents
Culture Documents
First #a% is used to update onl% run01 met$od ie #e can use onl% run01 met$od in t$is class Second
#a% is used to define several met$ods overridden !% derived class
*enerall% #e override onl% run01 met$od so #e go for runna!le interface
0?- 2h!# !re #he v!rio,& &#!#e& !$d +e#hod& o" #hre!d ;
States ) Lunning, Lead% to run, Suspended, Lesumed, !locked and terminated 3et$ods ) get+ame,
getPriorit%, is'live, "oin, run, sleep, start
.$read priorities are 3I+MPLIOLI.N, 3'OMPLIOLI.N, +OL3MPLIOLI.N
0/- 2h!# i& i$#erpro(e&& &y$(hro$iA!#io$ ; ( !l&o (!lled Mo$i#or )e+!phore *
a Consider a small !ox namel% 3O+I.OL t$at can $old onl% one t$read Once a t$read
enters a monitor, all ot$er t$reads must #ait until t$at t$read exits t$e monitor
! In t$is #a%, a monitor can !e used to protect a s$ared asset from !eing manipulated !%
more t$an one t$read at a time
c Once a t$read is inside a s%nc$roniHed met$od, no ot$er t$read can call an% ot$er
s%nc$roniHed met$od on t$e same o!"ect
30- 2h!# i& )#re!+ ;
a It is an '!straction t$at eit$er produces or consumes information
! .#o t%pes ) 6%te Stream and C$aracter Stream
Prepared By
Ms. A.Subathra Devi
MCA / Asst. Prof.
6
3:- @ow #o e$#er d!#! i$ D!v!;
a First specif% )
6ufferedLeader !r / ne# 6ufferedLeader0ne# InputStreamLeader0S%stemin112
t$en sa% !rread01, and t$is is put in do #$ile loop to receive as man% as #e re,uire
30- 2h!# i& ! )#ri$4To8e$iAer ;
String .okeniHer provide parsing process in #$ic$ it identifies t$e delimiters provided !% t$e user , !%
default delimiters are spaces, ta!, ne#line etc and separates t$em from t$e tokens .okens are t$ose
#$ic$ are separated !% delimiters
33- 2h!# i& )eri!liA!#io$ ;
.$e process of #riting t$e state of an o!"ect to a !%te stream and can restore t$ese o!"ects !% using
deserialiHation
Is also need to implement L3I, #$ic$ allo#s a "ava o!"ect of one mac$ine to invoke "ava o!"ect of
anot$er mac$ine
ie, t$e o!"ect is passed as an argument !% serialiHing it and t$e receiving mac$ine deserialiHes it
34- I$#er"!(e& i$(l,de by D!v!-l!$4 ;
Javalang is t$e package of all t$e classes 'nd is automaticall% imported into all Java programs
31- 2h!# i& ,&er de"i$ed eB(ep#io$;
.o $andle situations specific to our applications #e go for 5ser -efined Exceptions 'nd are defined
!% 5ser using t$ro# ke%#ord
36- Li&# o,# #he "e!#,re& o" 5!v!;
Simple, 'rc$itectureIneutral, O!"ectIoriented, Porta!le, -istri!uted, Hig$Iperformance,
Interpreted, 3ultit$readed, Lo!ust, -%namic, Secure
3>- 2h!# i& by#e (ode;
Java compiler translates a Java program into an intermediate language called Java bytecodesIIt$e
platformIindependent codes interpreted !% t$e Java interpreter
3?- 2h!# !re #he v!rio,& !ppli(!#io$& o" 5!v!
'pplets, +et#orking, InternationaliHation , Securit%, O!"ect serialiHation, Java -ata!ase
Connectivit% 0J-6C1
3/- 2hy do D!v! i& (!lled pl!#"or+ i$depe$de$#;
Java is called platform independent language !ecause :;;P Pure Java programs are compiled
into mac$ineIindependent !%tecodes, t$e% run consistentl% on an% Java platform
Prepared By
Ms. A.Subathra Devi
MCA / Asst. Prof.