Lambda hia wahd te3bir li kaymtel wahd ljoz2 dial lcode, had lcode kayakhod paramètre o kayrejee lik wahd natija.
Btali had lambda ra f7alha f7al les méthodes li mwalfin elihom walakin lambda makathtajch smia 3la 3ks les méthodes lakhrin.
(argument) -> {traitement}
(argument1, argument2) -> {traitement}
Expression Lambda mkowan mn 3 lhwayj:
- dakchi li qbel mn sehm : hna kaneetiwha les arguments, mli makaykonuch les arguments kaybqaw les parenthese khawyin
() -> {traitement}
sehm
->
: hada symbole li kaylseq les arguments btraitementtraitement: hna fin kayn dakchi li baghin mn lambda dir
linaftarid bli lgharad dialna howa d'implementer l'interface Personne et d'afficher Salam
Blama nste3mlo Lambda nqdro nkhedmo bclasse anonyme:
Had lmerra ghankhdem b lambda :
had lmital kayakhod 1 argument:
Had laminal kayakhod bof dial les arguments
Top comments (0)