A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

What is the meaning of 'contracts' in Java?

Best Answers

The contract is the interface they expose. For instance a Queue in JDK exposes a contract (interface) of: Queue (Java Platform SE 7 ) add(E e) offer() peek() etc ... read more

A contract in in a Java class is similar to a contract in the real world - In non-technical terms: It's an agreement that the class will expose certain methods, certain properties, and certain behaviors. read more

The Design by Contract technique stresses the importance of explicitly specifying the constraints that hold before and after a software component executes. The iContract Java language extension implements Design by Contract for Java. read more

Further Research