摘要: package Test; public class Computer { public static int getFac(int n) { if(n == 1|| n==0) return 1; else //递归调用 return n*getFac(n-1); } } package Apppackage; import Test.Computer; public class app { p 阅读全文
posted @ 2019-09-18 16:57 James_Harden 阅读(164) 评论(0) 推荐(0) 编辑
摘要: package Test; public class test5 { int count; public static void main(String[] args) { // TODO Auto-generated method stub //建立矩形的类的对象 Rectangle rect = 阅读全文
posted @ 2019-09-18 16:43 James_Harden 阅读(164) 评论(0) 推荐(0) 编辑
摘要: package Test; public class test6 { public static void main(String[] args) { // TODO Auto-generated method stub Mypoint mypoint1 = new Mypoint(1,1); Mypoint mypoint2 = new Mypoint(2,2); double distance 阅读全文
posted @ 2019-09-18 13:56 James_Harden 阅读(1111) 评论(0) 推荐(0) 编辑
摘要: 题目:编写一个类Computer,类中求阶乘 阅读全文
posted @ 2019-09-18 13:54 James_Harden 阅读(169) 评论(0) 推荐(0) 编辑