Introduction to OOP | Chapter 4: Classes and Methods: | next | previous | audio | real | text |
public interface Storing { void writeOut (Stream s); void readFrom (Stream s); }; public class BitImage implements Storing { void writeOut (Stream s) { // ... } void readFrom (Stream s) { // ... } };We will have much more to say about interfaces later after we discuss inheritance.