0% found this document useful (0 votes)
5 views4 pages

Java HA2

Uploaded by

Abhishek Maurya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

Java HA2

Uploaded by

Abhishek Maurya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Pagc No.

8S03 Datc.
G40097030004

Explain Lambda Expseasiens ond funtienalntce


utk cKanples.
Ans Funchienal dntsfoet
intefae bn neace that ha
A finctienal
absthaenethaedl.

Qfunetieralintesface

edAoyhles

Lambdo Fkesien
àashet wsy te inplenest a
funcional Anterface.

{pasanaeto) bady

taampe (Ngnal Lanbda)


that Lambda
itnacel

Wh Larsbda

pintla 'Hello).

Signature
A.D Stationery
Ond its operations
-DušCuss St,20m APT

Set )n a functional style.

Eoxample
.asbst,&. 3,4,s).
> ist = Aoys

s
.
List

Jutomediate
<întyen

Opetens
Opentons

map )
Gomple:
)
istster "1)
tte(x7.2 (e);

.
map

&. Temminal Oporatiens

•for eachU
Collet (U
edue()
eaampte
[Link])
e-( -'0)

aompe:
morna -[Link]
Lt ("Aron' 'Rohul,
names. stsean l)
[Link] ith"A");
Aterlhane
oFask (tn. eut: : Phadtn),
fatne:
Nomedcotin oigin al date

(lahen code
Page No.
Date. /

3 Explan (ollectln FeannewOAk


List, Set ondl Map.
Collectibn Fhanewk Hiecathy

Ttenabfe.

Callectien

Set MkSet cet)


Queue

ap(Stpasate Trtafae)
atnap
-TaceMap
acndate- Lt vs fet vs 7ap
featue

Diplcodes Allexc net allautl netallsu


keys
Ode Maintzina dden NassdeHas Sct)" Key-ralacai
Dodoing Ys Ne
AsayLit Haskset

amples
LKt: Lst <Tndegeh.st2n
Aayt<
lxtadd C1), lallowal.
Set Sct <Intgen>set new <U:
taksct
&et add);

Signature
A.D Stationery
new
p Map< îndegn,stsingrp
map. put (1
1"Aman),
map- pud (4. Rolt"); /Replaes value

xploin and Cempaator intefaes


Compahabe with
utab{e
tKamples.
ompaable
Uoed to define motuol ondoing t objets.
Exampfe
Clas Stucent npfnCnts Compable Lstdent
mak;
public t Conpart( Student )f
hetn tisi marks -s. maks; }

Companato
Used te deine uster
aomple:
á Conpaator< 6tudent> Conp = (s1, sa) smakisamante

Dfrence Tabfe:
Featune Comporable Comparato

hetiod CompaseroO compane(O


Natnal
sntng Cutonsotn
Lecaien Doside class
Dutde cas

Collections. Sed (list); h Cemporable


Collectiens. set (st, Comp); |Conpanato

You might also like