Can a class implements more than one interface?

Hello
Can a class implements more than one interface?
Thanks

Of course, this doesn't mean that it won't be a problem though. If the two interfaces have methods with the same signature, but different return types, you won't be able to implement them together. I.E.
interface InterfaceA {
  public int doSomething(String myString);
interface InterfaceB {
  public String doSomething(String myString);
// Now the classes
// Gives error "Duplicate method doSomething(String) in type ClassA"
public class ClassA implements InterfaceA, InterfaceB {
  public int doSomething(String myString) {
    System.out.println("A");
    return 0;
  public String doSomething(String myString) {
    System.out.println("B");
    return 0;
// Gives error "The return type is incompatible with InterfaceB.doSomething(String)"
public class ClassB implements InterfaceA, InterfaceB {
  public int doSomething(String myString) {
    System.out.println("A");
    return 0;
// Gives error "The return type is incompatible with InterfaceA.doSomething(String)"
public class ClassC implements InterfaceA, InterfaceB {
  public String doSomething(String myString) {
    System.out.println("B");
    return 0;
}

Similar Messages

  • Can i record with more than one audio interface

    I need to record 16 tracks, I have two different audio iterface, in GarageBand i can only find one of them, if i go to prefrenses-audio, I can set any of them as my audio interface, but only one at the time.
    Any tips to how I can use bouth simultanious? Cubase, Logic mabye, GarageBand no can do? :-)

    josteinfromoslo wrote:
     can i record with more than one audio interface
    yes, create an aggregate device:
    http://www.bulletsandbones.com/GB/Tutorials.html#allaboutaggregatedevices
    (Let the page FULLY load. The link to your answer is at the top of your screen)
    josteinfromoslo wrote:
    I need to record 16 tracks
    GB can only record 8 tracks at a time, however that is 16 channels, so with some extra effort you can get the outcome you desire, see the second tip here:
    http://www.bulletsandbones.com/GB/TricksHacks.html

  • May I start more than one interface at boot using network profiles ?

    Hi everybody,
    I installed ArchLinux on my laptop and I was playing with network profiles to obtain different configurations of the ethernet and wireless interfaces for home, office etc. Everything works fine using "!" in from of each configuration name in /etc/rc.conf and I found useful the menu option.
    As far as I understood each configuration file in /etc/network-profiles/ correspond to one interface only, therefore this utility does not allow me to start more than one interface at boot time. Am I right?
    In this case it exist already a script to choose between different configuration for two interfaces?
    Thanks in advance
    Jimmi

    Welcome to the Apple Community da dad.
    Yes you can connect multiple Apple TV's by ethernet.
    What do you mean by outside.

  • Can oracle  function return more than one value

    Hi All
    please answer can oracle function return more than one value
    need one schenario
    regards

    Can any function, irrespective of the language, return multiple values?
    OF COURSE NOT!!
    So why do you think Oracle will now suddenly do it differently than all other languages? Never mind that it is impossible for a function (a unit/module of code) returning a memory address, to return multiple memory addresses. The machine code that does that, has not been yet been designed/implemented.
    I am continually amazed that this question is asked. It is about something so fundamental in almost every single 3rd and 4th generation language... something that is taught right at the start... the definition of what a procedure and what a function is.
    Sorry, but I simply cannot pull punches on this subject and smooth it over. There is something fundamentally wrong with your training as a programmer if you have to ask such a question about a function.
    And whatever programming skills you build on such a foundation, will be seriously lacking.
    I kindly suggest that you get back to the very basics of programming - and review and revisit until you fully understand it. There are no shortcuts in becomming a good programmer.
    Message was edited by:
    Billy Verreynne

  • Can not color label more than one file at a time

    Hi,
    I've had this problem since 10.6.6-ish, i can not color label more than one file at a time in the Finder.
    Wether i select two, twenty or twohundred only one file gets color labeled.
    It doesn't seem to matter if i assign a color label through the File menu or right click > label.
    Figured a re-install might fix this but it hasn't (even a clean install without restoring any kind of backup).
    Does anyone else have this issue and/or a fix for it?
    Thanks,
    Jay

    Aaaaanyone ?

  • My sister has a mac and i want to update my phone onto the computer but i dont want her to see all my stuff can you somehow have more than one itunes account on the same computer so my stuff with save?

    my sister has a mac and i want to update my phone onto the computer but i dont want her to see all my stuff can you somehow have more than one itunes account on the same macbook so my stuff with save?

    How to use multiple iPhone, iPad, or iPod devices with one computer. The only way is for you to have a separate user account to log into on that computer.

  • Can I back up more than one mac to the time machine:

    Can I back up more than one Mac to a time machine? I have a laptop and a Mac Desktop computer can I back up both on the same Time machine

    Absolutely.
    However, quoting from ASC contributor Pondini's excellent Time Machine FAQ:
    It is advisable, though, to partition an external disk that will be connected to your Macs into one volume for each Mac ...

  • How can you set up more than one device on iTunes. I have an iPad, iPod, itouch and iPhone. I don't want the same on all devices.

    How can you set up more than one device on iTunes? I have an iPad, iPod, itouch and iPhone. I don't want the same on all devices. I have all my music/videos on iTunes on my mac book pro. Can you set up separate folders for each device and drop in what ever music/videos from the main iTunes library?

    In itunes it is called syncing and you can choose exactly what content to sync to all devices and it can be different for all of them
    How to sync

  • Why can´t i have more than one initiator task on my bpm process

    Hi All.
    I am working with BPM 11g and would like to know:
    Why can´t i have more than one initiator task on my bpm process
    In this case, i will have two separeted process where each has its initiator task?
    Regards,
    Diovani

    Hi Diovani
    Two different processes can have different task initiators...task initiator means creation of a process instance which can happen only once

  • I have a PC, Windows 7 x64. I installed a plug-in in Elements 13. I tried to installed another plug-in. It replaced the first plug-in . Can't I have more than one plug-in at a time??? If so, how?

    I have a PC with Windows 7 x64. I have Elements 13. I installed a plug-in (Topaz) which appeared under the Filter Menu.
    Then I tried to install my new Canon Printer software plug-in which put it under FILE > AUTOMATION TOOLS. However, when I tried to use TOPAZ under the FILTER MENU it was gone. In other words, the Canon printer plug-in replaced my Topaz plug-in. When I reinstalled the Topaz plug-in, it replaced the Canon Printer Plug-in.
    QUESTION: Can't I have more than one plug-in installed in Photoshop Elements 13 at a time? So that the Canon printer plug-in is in AUTOMATION TOOLS, and the Topaz plug-in is under the FILTER menu?

    Have a look at this thread.
    http://discussions.apple.com/message.jspa?messageID=2369954#2369954
    Before you try some of the suggestions bear in mind that your iPod is still under warranty.

  • How do I send pictures from iphoto to a group via email instead of to just one individual? I can't type in more than one name or send the pictures to a group.

    How do I send pictures from iphoto to a group via email instead of to just one individual? I can't type in more than one name or send the pictures to a group.

    I had a similar problem in that my wife's iphone 5 could not send pics with imessage.  Had to set the settings to default to SMS or whatever.  After laboring many hours on the web I coincidentally was on the phone with the internet people to question my internet speed.  They changed the router channel, which is something that I am capable of doing myself.  After that, the pics go over imessage.  My own Iphone didn't have the problem.  We are both latest IOS 7.0.6.

  • Iphone6 why can't I save more than one contact?

    iphone 6 why can't i save more than one contact?

    Hi Diovani
    Two different processes can have different task initiators...task initiator means creation of a process instance which can happen only once

  • HT1473 how can I download an more than one audio cd to itunes, scramble all and then transfer all back to a R/W cd?

    how can I download an more than one audio cd to itunes, scramble all and then transfer all back to a R/W cd?

    Import the CDs to iTunes one at a time, following these instructions.
    Once the tracks are in your iTunes library, put them into a playlist, and get them into the order you want.  Or if you by "scramble" you mean a randomly shuffled order, use the crossing arrows at the lower left to do so.
    When you are ready, insert a blank CD, use the command File > Burn Playlist to Disc, and create an audio CD.  I strongly suggest using CD-Rs rather than CD-RWs, since the latter often have trouble in normal CD players.

  • HT3924 Can I set up more than one monitor/displays to my Macbook Pro?

    Can I set up more than one monitor/displays to my Macbook Pro?

    OSX Maveric 10.9.1.  I have a 2.9 GHz Intel Core i7 with 8GB memory.  I like the new things I can do with maveric.  I have conected only one external monitor through the thinderbol conecting cable to VGA or HDMI.  I would like to conect 2 monitors and still use the laptop display ( total of three monitors). Can I do that?

  • Can i back up more than one iphone onto the same computer and keep data separate?

    can i back up more than one iphone to the same (pc) computer and keep the data separate?

    http://support.apple.com/kb/HT1495

Maybe you are looking for