• Explain the concept of the Java interface
  • Make use of an interface reference to refer to objects that implement the interface

Note taking requirement

Don't forget to submit your notes in Canvas prior to classtime.


Definition [1:46]

  • What is a behavior in object oriente programming.

Overview [4:46]

  • Why can't we create an object from an interface.
  • What is meant by a can-do relationship?
  • Why aren't implementations in an interface?
  • What are three classes that implement the CharSequence interface?

CharSequence Interface [5:52]

  • What parameters does the subSequence() method need?
  • How is the Comparable interface used?
  • How do interfaces allow you to use existing code with code yet to be written?

Memory Diagrams [6:26]

  • When does a type get an apostrophe in the memory diagram?
  • Does the reference type or object type determine what methods can be called?

Code Example [6:26]

  • What is the syntax for declaring an interface?
  • Why is public not neeed in front of interface methods?
  • What needs to be included in the class declaration to indicate that a class implements a specific interface?
  • How many classes can implement an interface?
  • What does the @Override annotation mean?
  • Notice how the compiler can't know what type of object ref1 refers to since it isn't determined until the program runs.

List Interface [8:44]

  • What class have we used in the past that implements the List interface?
  • Can an interface extend another interface?
  • What technique was used to convert an int to a String?
  • How do interfaces separate code that uses interface(s) from code that implments the interface(s)?