摘要: public class Teacher { String name; String subject; int age; public Teacher() { } public Teacher(String name,String subject,int age) { this.name=name; this.subject=subject; this.age=age; Syste... 阅读全文
posted @ 2017-04-09 16:06 苏轼的红烧肉 阅读(109) 评论(0) 推荐(0) 编辑
摘要: public class Student { String name; int age; String school; public void study(){ System.out.println(name+"正在玩命学习"); } public void exam(){ System.out.println(name+"正在"+school+"痛苦的考试"); } //构造方... 阅读全文
posted @ 2017-04-09 16:05 苏轼的红烧肉 阅读(107) 评论(0) 推荐(0) 编辑
摘要: public class Person { String name; int age; void eat(){ System.out.println(name+"正在吃"); } void eat(String food){ System.out.println(name+"正在吃"+food); } void eat(String food,int number){ ... 阅读全文
posted @ 2017-04-09 14:44 苏轼的红烧肉 阅读(96) 评论(0) 推荐(0) 编辑
摘要: /*定义一个计算器实现加减乘除累加阶乘求平方次方并判断是否是素数public class Cal { public int jia(int a,int b){ int sum=a+b; return sum; } public int jian(int a,int b){ int jian=a-b; return jian; } public int cheng(... 阅读全文
posted @ 2017-04-09 14:17 苏轼的红烧肉 阅读(205) 评论(0) 推荐(0) 编辑
摘要: public class Cal { //交换两个变量的值 //排序 public void sort(int []a){ for (int i = 0; i a[j+1]){ int t=a[j]; a[j]=a[j+1]; a[j+1]=t; } } } ... 阅读全文
posted @ 2017-04-09 13:40 苏轼的红烧肉 阅读(134) 评论(0) 推荐(0) 编辑
摘要: public class Cal { //交换两个变量的值 //排序 public void sort(int []a){ for (int i = 0; i a[j+1]){ int t=a[j]; a[j]=a[j+1]; a[j+1]=t; } } } ... 阅读全文
posted @ 2017-04-09 13:40 苏轼的红烧肉 阅读(91) 评论(0) 推荐(0) 编辑