i. Partner deadline tonight
ii. Extra credit posted
i. Every Class extends Object
ii. Override methods
1. equals(Object o), toString()
iii. instanceof
i. Definition a contract between interface and
implementing classes
ii. Defining
1. Syntax
2. Interface type
3. Abstract methods
4. static final constants
public interface
<name>{
<returnType>
<methodName>(<params>);
}
i. Do not put any code in methods
ii. Do not say methods are public they always
are
iii. No instance variables
iv. No static methods
v. Pay attention to the semicolon after the
method declaration(s).
<type> <CONSTANT_NAME>=<value>;
i. Note these are always public static final,
even though we dont explicitly say so
public class <name> implements
<interface1>,<interface2>
i. Stubs are ok though
<InterfaceName> o=new <ClassThatImplementsInterface>();
i. Thus, you know that object must implement the
behavior defined in the interface
i. http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Comparable.html
i. Dont add or change methods
i. Note: not 1,0,1. Can be any negative or positive values