摘要: 1 abstract class Person { 2 public abstract void eat(); 3 } 4 5 public class Demo { 6 public static void main(String[] args) { 7 Person p = new Person 阅读全文
posted @ 2020-05-16 12:02 福尔 阅读(239) 评论(0) 推荐(0) 编辑
摘要: Table of Contents 1 递归方式 2 封装进一个工具类 3 迭代实现 4 解决返回值超出整型最大值问题 5 加入缓存机制 6 使用接口编程,把算法实现推向实现,即使用了策略模式 7 如何实现这种方式的动态调用? 7.1 用map存储类映射 7.2 重写阶乘工具类 7.3 缓存实现 7 阅读全文
posted @ 2020-05-16 00:35 福尔 阅读(268) 评论(0) 推荐(0) 编辑