vera911213
脚控 foot controlled I/O扩展 extansion on 紧急停止 emergency stop; urgency stop电源灯 power品切 seld out停止 stop原点 origin(point);punch mark ;initial point启动 startup
爽爽小无敌
直接上代码:public interface HelloInterface(){ void hello();}public class HelloImpl implements HelloInterface{ void hello(){ System.out.println("Hello World"); }}HelloImpl这个类是实现HelloInterface的。
冒火得很000
interface为名词时意为:(人机)界面(尤指屏幕布局和菜单),接口,接口程序,连接电路,(两学科、体系等的)接合点,边缘区域。interface为动词时意为:(使通过界面或接口)接合,连接。
interface读音:英 [ˈɪntəfeɪs],美 [ˈɪntərfeɪs]。
第三人称单数:interfaces。复数:interfaces。现在分词:interfacing。过去式:interfaced。
双语例句:
1、The system uses an impressive graphical interface.
这一系统采用了特别好的图形界面。
2、The new version of the program comes with a much better user interface than the original.
新版程序的用户界面比原来程序的好得多。
美丽心情day006
硬件中的“接口”概念-------------------------- 硬件接口即I/O设备适配器,具体指CPU和主存、外围设备之间通过总线进行连接的逻辑部件。 接口部件在它动态连接的两个部件之间起着“转换器”的作用,以便实现彼此之间的信息传送。 为了使所有的外围设备能够兼容,并能在一起正确地工作,CPU规定了不同的信息传送控制方法。 一个标准接口可能连接一个设备,也可能连接多个设备。 典型的接口通常具有如下功能:1.控制 接口靠程序的指令信息来控制外围设备的动作,如启动、关闭设备等。2.缓冲 接口在外围设备和计算机系统其他部件之间用作为一个缓冲器,以补偿各种设备在速度上的差异。3.状态 接口监视外围设备的工作状态并保存状态信息。状态信息包括数据“准备就绪”、“忙”、“错误”等等,供CPU询问外围设备时进行分析之用。4.转换 接口可以完成任何要求的数据转换,例如并--串转换或串--并转换,因此数据能在外围设备和CPU之间正确地进行传送。5.整理 接口可以完成一些特别的功能,例如在需要时可以修改字计数器或当前内存地址寄存器。6.程序中断 每当外围设备向CPU请求某种动作时,接口即发生一个中断请求信号到CPU。 事实上,一个适配器必有两个接口: 一是和系统总线的接口,CPU和适配器的数据交换一定的是并行方式; 二是和外设的接口,适配器和外设的数据交换可能是并行方式,也可能是串行方式。根据外围设备供求串行数据或并行数据的方式不同,适配器分为串行数据接口和并行数据接口两大类。编程中的“接口”概念-------------------------- 编程中所谓的接口,实际上也是一个类,只是在接口中声明了一组常量和方法,但事实上没有实现任何方法。这有点类似抽象类,接口需要其他类来提供实现自己所定义方法的过程,而不是自己提供。这里的用接口实现多继承实际上就是可以用类来实现多个接口中的方法。
颖儿yuki
//英文好的自己读一下,不好的复制到google翻译里面看一下你就大致知道接口的意思了!Suppose we're creating a logging class, Logger, that reports status messages ("log entries")for a program as it runs. Many classes receive the Logger's status messages, and respondto them in different ways. For example, one class, LogUI, displays log messages on screen;another class, LiveLog, alerts a live support technician via a networked administrationtool; and yet another class, LogTracker, adds log messages to a database for statisticstracking. To receive log messages, each class defines an update() method. To send amessage to objects of each interested class, the Logger class invokes the update() method.That all seems logical enough so far, but what happens if we forget to define the update() method in the LogUI class? The status message will be sent, but LogUI objects won'treceive it. We need a way of guaranteeing that each log recipient defines the update()method.To make that guarantee, suppose we add a new requirement to our program: any objectthat wants to receive log messages from Logger must be an instance of a genericLogRecipient class (which we'll provide) or an instance of one of LogRecipient'ssubclasses. In the LogRecipient class, we implement the update() method in a generic way—by simply displaying the log message using trace():public class LogRecipient {public function update (msg:String):void {trace(msg);}}Now any class that wishes to receive log messages from Logger simply extendsLogRecipient and if specialized behavior is wanted, overrides LogRecipient's update()method, providing the desired behavior. For example, the following class, LogTracker,extends LogRecipient and overrides update(), providing database-specific behavior:public class LogTracker extends LogRecipient {// Override LogRecipient's update()override public function update (msg:String):void {// Send problem report to database. Code not shown...}}Back in the Logger class, we define a method, addRecipient(), that registers an object toreceive log messages. The basic code for addRecipient() follows. Notice that only instancesof the LogRecipient class and its subclasses can be passed to addRecipient():public class Logger {public function addRecipient (lr:LogRecipient):Boolean {// Code here should register lr to receive status messages,// and return a Boolean value indicating whether registration// succeeded (code not shown).}}If an object passed to addRecipient() is not of type LogRecipient, then the compilergenerates a type mismatch error. If the object is an instance of a LogRecipient subclassthat doesn't implement update(), at least the generic update() (defined by LogRecipient)will execute.Sounds reasonable, right? Almost. But there's a problem. What if a class wishing to receiveevents from LogRecipient already extends another class? For example, suppose theLogUI class extends flash.display.Sprite:public class LogUI extends Sprite {public function update (msg:String):void {// Display status message on screen, code not shown...}}In ActionScript, a single class cannot extend more than one class. The LogUI class alreadyextends Sprite, so it can't also extend LogRecipient. Therefore, instances of LogUI can'tregister to receive status messages from Logger. What we really need in this situation is away to indicate that LogUI instances actually belong to two datatypes: LogUI andLogRecipient.Enter...interfaces!
优质英语培训问答知识库