package project_abstract;
public abstract class Shape {
public abstract double perimeter();
public abstract double area();
public abstract void cal();
}
public abstract class Shape {
public abstract double perimeter();
public abstract double area();
public abstract void cal();
}
2016-05-21
package project_abstract;
public class Initial {
public static void main(String[] args) {
// TODO Auto-generated method stub
Shape rec = new Rectangle(4, 3);
Shape cir = new Circle(2);
rec.cal();
cir.cal();
}
}
public class Initial {
public static void main(String[] args) {
// TODO Auto-generated method stub
Shape rec = new Rectangle(4, 3);
Shape cir = new Circle(2);
rec.cal();
cir.cal();
}
}
2016-05-21
System.out.println("内部类中的name:" + this.name );//这样就是错的
Reason:Cannot use “this” in a static context
Reason:Cannot use “this” in a static context
2016-05-20
有没有同学跟我一样,在电脑上慕课的视频打不开,怎么破。之前还可以的,今天就是打不开。其他什么YouTube都可以看视频的,不知道是什么情况,谁能解决这个问题。现在只能用手机端看。谢谢。
2016-05-20