调用父类 (Superclass) 的成员或者方法调用父类的构造函数调用父类 (Superclass) 的成员或者方法如果你的方法覆写一个父类成员的方法, 你可以通过 super 关键字调用父类的方法. 考虑下面的父类: public class Superclass { public void printMethod() { System.out.println("Printed in Superclass.");
题目一 class Base{} class Agg extends Base{ public String getFields(){ String name = "Agg"; return name; } } public class Avf{ pulic static void main(String argv[]){ Base a = new Agg();
接口是抽象方法的集合。一个类实现一个或多个接口,因此继承了接口的抽象方法.接口的特点不能实例化没有构造体所有方法都是抽象的 (abstract).同时也是隐式的 public static. 也就是说声明时, 可以省略 public static.只能含有声明为 final static 的 field
An environment for developing and deploying enterprise applications.The J2EE platform consists of a set of services, application programming interfaces (APIs), and protocols that provide the functionality for developing multitier, web-based applications.
Externalizable is an interface which contains two methods readExternal and writeExternal. These methods give you a control over the serialization mechanism. Thus if your class implements this interface, you can customize the serialization process by implementing these methods.
Serialization is a mechanism by which you can save the state of an object by converting it to a byte stream.JAVA中实现serialization主要靠两个类:ObjectOuputStreamObjectInputStream他们是JAVA IO系统里的OutputStream和InputStream的子类自定义序列化的作用如下:Persist only meaningful data.