- 博客(12)
- 收藏
- 关注
原创 接口
public interface Animal{ public abstract void cry();} public class Tiger implements Animal{ public void cry(){ System.out.println("I am a tiger"); }} public class Bear impleme
2017-05-05 10:33:49 262
原创 几何的类
Circle和Triangle是Geometry的子类public class Geometry{ public double area(){ return 0; }} public class Circle extends Geometry{ private double r; public Circle(double r){ this.r=r;
2017-05-05 10:17:38 334
原创 继承
public class People{ private int age; public void setAge(int age){ this.age=age; } public int getAge(){ return age; } public void print(){ System.out.println("I am a people"); }
2017-04-28 10:37:23 251
原创 people类
public class People{ private int age; public void setAge(int age){ this.age=age; } public int getAge(){ return age; } public void print(){ System.out.println("I am a people"); }
2017-04-28 10:18:29 721
原创 求圆锥体积
class Circle{ private double radius; Circle(double r){ radius=r; } public void setRadius(double r){ radius=r; } public double getRadius(){ return radius; } public dou
2017-04-07 11:22:02 1808
原创 圆柱体积
class Circle{ private double radius; Circle(double r){ radius=r; } public void setRadius(double r){ radius=r; } public double getRadius(){ return radius; } public dou
2017-04-07 11:08:36 586
原创 圆的构造方法
class Circle{ private double radius; Circle (double r){ radius=r; } Circle(){ radius=1; } Circle(Circle c){ radius=c.radius; } public void setRadius(double r){ radius=r; }
2017-03-24 10:24:47 1195
原创 C#随机数及排序
class Program{ static void Main(string[] args){ int n; Console.Write("输入个数:"); n=int.Parse(Console.ReadLine()); int[] a=new int [n]; Random r=new Random(); for(int i
2017-03-24 10:14:00 940
原创 排序
class PaiXu{ public static void main(String arg[ ]){ double a[ ]=new double[10]; int imin;
2017-03-12 12:38:15 195
原创 数组以及程序格式
public class Example{ public static void main(String args[ ]){ int a[ ]; a=new int[10]; for(int i=0;i
2017-03-03 22:52:25 250
原创 JAVA
JAVA中的50个关键字abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import inst
2017-02-26 15:09:45 198
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人