What is pattern matching? #javalanguage #javacoding #javatips #javacodinginterview #coding

preview_player
Показать описание
Cracking the #Java #Coding #Interview - Question 241: What is pattern matching?
Рекомендации по теме
Комментарии
Автор

In recent days(especially after rust become famous). Destruction is considered as a must feature for pattern matching. It's better to introduce record destruction pattern more. e.g. we can have switch (expr) { case Expr.Add(Expr.Int(var x), Expr.Add(Expr.Int(var y), Expr.Int(var z))) -> x + y + z; }

dragondove
Автор

More Examples can help to understand..

harshtripathi
Автор

During interview, no one would ask 241 questions 😂😂

praveens
Автор

Will enhanced for-loop pattern still part of Java? It was proposed and withdrawn last minute.

julianjupiter
Автор

Does pattern matching exist before Prolog and SNOBOL?

germanandresruizhernandez
visit shbcf.ru