摘要: /** * @author: TSCCG * @date: 2021/4/27 * 值传递机制 */ public class StringTest { String str = new String("good"); char[] aw = { 't', 'e', 's', 't' }; publ 阅读全文
posted @ 2021-04-27 21:28 TSCCG 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 1. 阶乘公式 n!=1×2×3×...×n 阶乘也可以用递归方式定义: 0!=1,n!=(n-1)!×n 2. 使用循环实现阶乘 n!=1×2×3×...×n /** * 1、使用循环实现阶乘 */ public class Factorial { public static int fact(i 阅读全文
posted @ 2021-04-27 18:00 TSCCG 阅读(3201) 评论(0) 推荐(0) 编辑