Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8132907

Mistake in example in Interfaces page in Tutorial

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • docs
    • None

      In Interfaces, http://docs.oracle.com/javase/tutorial/java/IandI/createinterface.html

      =========

      public class OperateBMW760i implements OperateCar {

          // the OperateCar method signatures, with implementation --
          // for example:
          int signalTurn(Direction direction, boolean signalOn) {
             // code to turn BMW's LEFT turn indicator lights on
             // code to turn BMW's LEFT turn indicator lights off
             // code to turn BMW's RIGHT turn indicator lights on
             // code to turn BMW's RIGHT turn indicator lights off
          }

          // other members, as needed -- for example, helper classes not
          // visible to clients of the interface
      }

      =========

      int signalTurn => public int signalTurn

            bhoran Bernard Horan (Inactive)
            rgallard Raymond Gallardo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: