????Interfaces ???

??????????????У??????“???”?漲???????????С????????????????????????????????С?鶼????????????????????????????????????????Java?е?interface???????????“???”??

??????????????????δ????????????????????????????????????????????????????????????????????????????????Java????????????????????????????????????????????????????????????????GPSλ????????????????????????????????????Щ??????????????

?????????????????????????interface????interface???????????Щmethods???????????????????????????????κ????????κ???????????????????????????????interface??????????methods?????????????κ?????????????????????????????????????????????????????????????????????????interface???????????????????????и????????????????????????????

??????java?е?interface

??????java????????????interface???????????reference????????class????????????????????constants?????????????method signatures????????????nested types????Interface???ú??з???????????method body???? Interface ????????????instantiated????????????class????implemented???????????interface??С?

???????????interface????????????????

    public interface OperateCar { 
    // constant declarations?? if any
    // method signatures
    // An enum with values RIGHT?? LEFT
       int turn(Direction direction?? 
                double radius?? 
                double startSpeed?? 
                double endSpeed); 
       int changeLanes(Direction direction?? 
                       double startSpeed?? 
                       double endSpeed); 
       int signalTurn(Direction direction?? 
                      boolean signalOn); 
       int getRadarFront(double distanceToCar?? 
                         double speedOfCar); 
       int getRadarRear(double distanceToCar?? 
                        double speedOfCar); 
             …… 
       // more method signatures
    }

??????????????????interface???????д???class????????????????????????class??????????????????????и?interface???????????з?????methods??????????

???????????????????????????У??????????????????????????????????????????????????﹫???????????????????????????? ??????????????????????????????????????????????λ??GPS?????????????????????????????????????????????????漰???μ??????methods???? ????е???????????????

????API ???

???????????????????????interface?????????ó??????API?? Application Programming Interface???е????. ?????????У?API???????? ?????????????????????????л??????????????????????????е?????????methods???????????????????????δ????????????????????????????????????????????????ù?????????interface??????????????????????????п??????????API????????ЩAPI??????????????????????????????????interface?????????ЩAPI??????????????????????д??

????Interfaces ???????

??????java?????????interface?????????????????á? ????Interface????????????????????????????ν?????????java???????????????У?????interface?????????????

??????java?У??????????????????????????????????????????????????ж??????????????????????????????????????е????н????????????ζ?????????????????????????????????????????????κ????y??????????????????“??y??????”??????????