When to use the interface and what Abstract Class?

In a recent interview, was asked "when to use interface and what Abstract Class? Explain with an example.


Situations in which a class should also end (example in real time)

Have you tried to read this ? It is quite clear

D.

Tags: Java

Similar Questions

  • When to use the interface and use when substituted

    I'm so confuse to use interface and substituted. Please give me some example practice how it is practically used in our daily lives.

    There is a lot of info that you may find yourself on the use of interfaces and by substituting methods. But I say, you do not use one or the other - they are quite different things. An interface is like a contract that specifies a class contain certain methods - those defined by the interface. The interface is just a summary of the class with the signatures of method only - no actual code. Substitution of a method, it is when your method of the upper class is used instead of this method is inherited from its superclass.

  • Cursor turns in a circle when you use the pen and Wacom Tablet?

    When you use the stylus and Tablet Wacom the cursor becomes a circle inscribed in a circle and use.

    What type of Wacom tablet work?  I have a Cintiq, and according to that tool I use, I tend to change the pointer in what ever I need.

    But if you use an Intuos I can ask someone at Wacom Europe, since I work closely with them on the Wacom InfoChannel.

    Let me know.

  • RunTimeException when you use the timer and TimerTask.

    In the switchNext() method, it changes an image and some text in a Vertical management. When I run the application, I get a RunTimeException. However, when I have not used the timer and tested the method switchNext() with just a button method worked perfectly. How can I make it work with timer or another class that he will call every 30 seconds?

     time = new Timer();
    TimerTask task = new TimerTask()
    {
    
    public void run()
    {
    
        switchNext();
    }
    };
    time.schedule(task, 10000);
    

    It would be useful to know what Exception you actually get.

    However, I think that it is indeed related to the fact IllegalStateException the TimerTask is running in the "bottom", and you try to update your User Interface.

    If you change the code as follows, it will work the method on the event Thread and so he has access to update the user interface.

    public void run()
    {
    UiApplication.getUiApplicat () .invokeLater (new Runnable()

    public void run() {}
    switchNext();

    }});
    }

    You can find more information on the event thread here:

    http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865

  • Firefox does not open with the tabs I had open when I use the renunciation and backup function. Firefox opens on my home page only. How to fix?

    When I use the function "Save and exit" has no effect. The next time I open Firefox it goes to my home page only.

    This has happened

    Each time Firefox opened

    Is 3 days ago

    If you use delete navigation, search and download history on Firefox in Firefox 3.5/6, or clear private data in Firefox 3 to clear the browsing history when Firefox is closed then in restaurant tabs at the last session (for example "save and exit" or "show my windows and tabs from last time ') does not work.

  • When to use the AUTHORITY and when to use RTMP?

    Can Hello someone explain the difference?

    I use all the default values for the files of configurations (remoting and datamanagement) and my app works perfectly on the mode of development where everything is on localhost, but when we try on pre-production, it continues to launch an error message saying it could not connect to the RTMP channel. The only thing that changes between these two modes is that in development I access anything on localhost and pre-production we point to another server.

    I'm totally helpless, why this is happening, I am bit confused data management using the RTMP protocol and why Remoting uses the AMF, so if someone could explain it to me that would be great.

    Thank you

    There is no special reason why we use the Protocol RTMP AMF vs. Data management service also allows the authority of financial markets and Remoting also RTMP. The only real requiement is that data management service must be able to receive updates from the SDS/screens LCD server. This can be achieved using a channel that is able to receive updates from the server (for example. RTMP) or a string that can be able to query for updates on the server (that is, AMF-polling). Therefore, when using AMF with data management service, you must do the poll enabled with a polling interval.

    In terms of why the work of the financial but RTMP AMF market not is that AMF channel uses AMF format via the HTTP protocol so that channel RTMP uses simple TCP socket (and not HTTP). This is why in some environments, RTMP will be blocked by the firewall but AMF will not since it's like normal HTTP traffic. In this case, you can use AMF to query instead or use RTMPT, what's new in 2.5 LCD displays.

  • get rid of the email in Outbox that does not send when I used the reply and forward.

    When I got trouoble replying to email messages went to my Outbox and stayed there.  I decided to clean things up so I deleted them.  Now, whenever I connect to the computer until get the message at the bottom of the screen it says 1 mailing of 4.  There is nothing to send because I deleted everything in the Outbox.  How can I get my computer to stop trying to send emails in the Outbox that I deleted.  Any help that anyone can give me in this matter would be greatly appreciated.  Thanks again.  Dolly.

    You don't mention your e-mail program. If you use Outlook Express, follow these steps.

    Spend most of your messages out of the Inbox and then create new folders to send and sent items box after having moved the messages you want to save to a local folder that you create.

    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.

    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder Options icon | Opinion, or in Windows Explorer. Tools | Folder options | View.

    With OE closed, find the DBX files for the items in the Outbox and sent and delete them.  New ones will be created automatically when you open OE.

    After you're done, followed by compacting your folders manually while working * off * and do it often.

    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.

    General precautions for Outlook Express:

    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.

    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095

    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3

    Why you don't need your anti-virus to scan your email
    http://thundercloud.NET/infoave/tutorials/email-scanning/index.htm

    Note that for some AV programs, it may be necessary to uninstall the program and reinstall in custom Mode and uncheck analysis when the option is the result of e-mail messages.

    Compact often as specified above.

    And backup often.

    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx

  • I am not able to adjust the area of focus when you use the shift and tilt feature.

    I tried several times checked internet, watched the tutorials, rechecked my system, it just doesn't work.

    You can get a more precise effect using the standard brush. After clicking on the first tour box change to apply the blur tilt/shift go to:

    File > save as

    Save a copy of the PSD and then go to Expert mode.

    Make sure that the black mask thumbnail is selected (highlighted) in the layers palette and choose the Brush tool with white color (top) chip value try to brush off with a low opacity.

  • When you use the copy and collect the files to the new location, I get the error file not found...

    I have 24 hours to media manage and send a feature-length documentary online instead. Everything is ready to go and so I'm going in the media project manager manage all this and I get the following error message:

    export.jpg

    This is meaningless - why he's looking for the file that it is the copy in the destination folder? The file in question is not in offline mode, it is bound to correctly in the project file and reads without problems. I also tried manually copying the file in the destination folder to see if it changes anything, but no luck.

    I would like ideas, that anyone could have!

    Thank you!

    -Michael

    It seems that because the name of the file was a '-' in there. I changed the name of the file and then reconnected and it has been working fine since.

  • My computer (gateway GT5404) becomes noisy when you run the windows media player, often when you use the interent and frequently when loading files/photos or download. What is a hard drive problem?

    My computer did this for about a year. It is currently 4 years with 1 GB of RAM.

    JBW

    Could be HD or thermal / fan.  I want to download cpu - z and gpu - z (both free) to check the time.

    I also get the HD of the Lim diagnostic utility and run it to check the HD

  • Safari closes when I use the browser. What should I do?

    I can't search on Safari. I use yahoo because its in my top sites history... If I type anything, Safari's FARM... Help?

    Safari is a web browser.  Yahoo is a web site.  They are not the same thing.  You use Safari to search for stuff on Yahoo.  Quit Safari, and then open it in Mode safe holding the SHIFT key while clicking on the Safari icon in your dock.  Go to Yahoo and search for something, anything.  What is going on?  You have extensions/plug-ins installed?

  • Files and settings are not transferred when I use the files and the Settings Transfer Wizard

    Two XP computers are same all critical Service Pack 3 with the update.  Same version of FAST.

    Running FAST on the old computer (files and settings) creates the USMT2. The UNC file.

    Run FAST on the NEW computer concludes the USMT2. UNC file and works through its steps.

    Both measures take about two hours to complete.

    When FASTING is complete on the new computer he wants to disconnect the user.  At this point, it seems that it worked without errors.  (no error messages at all)

    After the Cup then turn it back, it's as FAST does not work.

    FASTWiz.log is 175KO on OLD PC and 72KO on NEW

    Don't know what to look for or what could be the problem.

    Both computers have MigWiz.exe version 5.1.2600.5512

    I'm glad you worked on it.  Thanks for letting me know.

  • When I use the figure and figure legend my images disappear in the view Design of DW. I'm doing something wrong?

    It is a continuation of an attempt to make my art stained glass appear in google image searches.

    I add alt tags and also started, on the advice of Nancy O. (thanks again) and from other sources, to replace my current framed with figure and figcaption html.
    With a bit of fiddling, I figured out how to make this work so that it appears in a browser (Safari) (I'm really not that familiar with html code).  Anyway, I like what I'm saying, but there is none in the design view of Dreamweaver(DW CS3) image in the image area, just the languge imgsource text and alt appears. Nor the caption text appears in design mode.


    Is it just an irreparable between HTML5 and the CS3 Dreamweaver divergence or is there something I can do so that I can still see pictures when you work in the Design or split mode?

    Your image tags are not closed, you miss him > at the end of each . For example, change the following...

    stained glass image of holy family visited by angel in abstract religious style

    TO

    stained glass image of holy family visited by angel in abstract religious style>

  • Error code 0 x 80300113 - when you use the diagnosis and repair for Internet connection

    So ive been trying to get my internet to work for 3 days now on my new ASUS laptop. I can get it for about 2 minutes then just triggers. Ive done everything, reset the router the main box and the same change in cables. Ive plugged and unplugged the cable cat. If I reset the computer it works again for 2 mins more, then cut again. If I click on diagnose and repair if gives me an error message. This message is an error Code 0 x 80300113 that's saying. Not only to mention that my Windows 7 slowing down when ever I click on a program. As if my computer was completely maxxed on the hard drive and everthing. If I can get help thatd be great. Thank you

    I never said it was a problem of IE.

    I just figured out the problem. The date on my clock has not been set correctly. I don't know why this would have caused this problem, but the error is over now. Double and triple check your time, year and time zone. I had it established to the year 3010 for some odd reason. I am now able to run without problem diagnosis and my Internet works perfectly now.

    Kris

  • LR 4.4.1 crashing on iMac osx 10.8.5 when you use the exposure and shadows. Does not restart with about reset surge protector. Worked perfectly for 1.5 years of upgrades to 4.4

    Hello

    Thanks for any help you may have. 4.4 LR worked perfectly on iMac 27' OSX 10.8.5 for 1.5 years until October this year when close downs began before making the adjustment on mainly the exposure sliders and shadow. Unit will not re-start less wait reboot power surge will become after 10-15 minutes. Apple replaced the card main and erased the disc. Backup LR 4 recharged and upgrade 4.4.1. New protection against overvoltages or directly in decision-making makes no difference and stop occurs immediately after moving the cursor. An old man can make suggestions or auto checks? This is the teacher/student version.

    Thank you dj. I'm going back to Apple and let him until he succeeds (the sixth time, as its under warranty) any other suggestions anyone?

Maybe you are looking for

  • Link colors are always overridden

    Firefox 11.0 on XP SP3In 'Options, content, colors' even if "Allow pages to choose their own colors" is checked, firefox link colors are always used. Occurs in all the sites I've looked at. Turn the start/stop script makes no difference. Firefox 3.x

  • Having some problems with drivers

    Hello everyone I have a problem with PCI-controller and controller-Sm where I can find the drivers for them? I have model g1254sg. PC-controller PCI\VEN_10EC & DEV_5209 & SUBSYS_166F103C & REV_01PCI\VEN_10EC & DEV_5209 & SUBSYS_166F103CPCI\VEN_10EC &

  • Error adding network printer

    I created, deleted and created again, a printer in network in Server 2008 Standard.  I shared out and I am able to see the printer in the list when you add a network printer using a XP 32 bit workstation.  When I try to add the printer from a worksta

  • error on a blue screen after you set new Athlon Proc and motherboard - Strop 0x0000007e (0xc0000005, 0xba2cb756, 0xba4c742c, 0xba4c7128)

    Original title: I need emergency with a blue screen error after new Athlon Proc and motherboard.! I had to fix my computer professional brothers due to its motherboard out. So, I advanced and ordered a motherboard latest and processor and also much m

  • Assistant touchpad on hp5510

    Just changed wireless cable and try to activate the connection between the computer and HP5510 printer by using wizard in the small touchpad on the printer. I asks me to enter my password is 8 letters the letters are grouped in threes and I can't inp