36

Java函数式编程和lambda表达式-zero菌

 5 years ago
source link: http://blog.51cto.com/zero01/2284379
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
为什么要使用函数式编程函数式编程更多时候是一种编程的思维方式,是种方法论。函数式与命令式编程的区别主要在于:函数式编程是告诉代码你要做什么,而命令式编程则是告诉代码要怎么做。说白了,函数式编程是基于某种语法或调用API去进行编程。例如,我们现在需要从一组数字中,找出最小的那个数字,若使用用命令式编程实现这个需求的话,那么所编写的代码如下:publicstaticvoidmain(String[]a

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK