answersLogoWhite

0

Simple example in interface

Updated: 8/10/2023
User Avatar

Wiki User

13y ago

Best Answer

Any device or construct that allows a human being to interact with a machine is an interface. The steering wheel of a car is an interface, the play button on a DVD video player is an interface, the close icon on a window is an interface, the CTRL+C accelerator is an interface, and so on.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

Interfaces are extremely useful in creating inheritance hierarchies in java programs. Interfaces cannot be extended but they will be implemented.

Ex:

public Interface Interface1 {

public String getName() {};

}

public Interface Interface2 {

public int getAge() {};

}

public class InterfaceExample implements Interface1, Interface2 {

public String getName() {

return "Anand";

}

public int getAge() {

return 28;

}

}

Here I have implemented two interfaces in a class. I must provideimplementation for all the methods that are declared inside both interfaces. So for simplicity I have just written 1 method in each interface but in practical situations you may have numerous methods inside each interface.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Simple example in interface
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is an interface in visual basic?

An interface in visual basic is any visual thing. For example, when you're making your forms, that's an interface.


What is 3 differences between software interface and command line interface?

Differentiate between Command line interface and Menus interface and example of each interaction style


What is an example of a software interface for bidding?

EBay is another software interface that specializes in bidding sales by individuals.


What is TE interface in cisco?

A TenGigabitEthernet interface can be abbreviated as Te at the command line. For example Te0/0/1 equals interface TenGigabitEthernet0/slot0/port1.


What is the reasoning behind the ridiculous user interface of wikianswerscom?

could you give an example of a ridiculous part of the interface. Thanks.


What is IO interface?

An I/O interface is a facility on a computer system for input and/or output of data. An example is a USB port on a PC.


Which Technology is used to create website.?

Software which can be used in a "gui" interface situation and then be saved and complied to launch on a site. Simple wysiwyg programme like coffee cup which is free and easy to use are an example of this


What does it mean when a user sees the command prompt Router config-if?

On a Cisco router, that means that you entered interface configuration mode; any command you give will affect the selected interface. For example, you may have given the commands:Router>enableRouter#configure terminalRouter(config)#interface FastEthernet 1/0Router(config-if)#On a Cisco router, that means that you entered interface configuration mode; any command you give will affect the selected interface. For example, you may have given the commands:Router>enableRouter#configure terminalRouter(config)#interface FastEthernet 1/0Router(config-if)#On a Cisco router, that means that you entered interface configuration mode; any command you give will affect the selected interface. For example, you may have given the commands:Router>enableRouter#configure terminalRouter(config)#interface FastEthernet 1/0Router(config-if)#On a Cisco router, that means that you entered interface configuration mode; any command you give will affect the selected interface. For example, you may have given the commands:Router>enableRouter#configure terminalRouter(config)#interface FastEthernet 1/0Router(config-if)#


How does a CLI differ from a GUI?

CLI is Command Line Interface GUI is Graphical User Interface CLI - You type commands into a prompt and the computer executes them. GUI - You use a graphical interface and make selections with the mouse and the computer executes them. CLI example: MS-DOS GUI example: MS Windows XP


What are example of an organic form of carbon?

Glucose is a simple example.


Does the Suunto GPS watch have a simple user interface?

The Suunto GPS watch do have a simple user interface, If you often run cross-country but am limited to the routes I know off by heart. and are thinking of buying a Suunto GPS watch so I could run different routes. the suunto is easy.


What is a terminal emulator inside a graphical user interface called?

A terminal emulator inside a graphical user interface is often called a terminal window. A terminal window allows access to a text terminal and its applications, for example the command line interface.