Some simple question , but i dont know...try & catch ..

Hi i was working on a media player and i've faced some problems...like what exactly does the try&catch do ??
and in the Player class what the realize() and prefetch do ??
Thank you in advance..
Mulham Haffar

If you are in doubt when or what exceptions to catch, use the java compiler as your guide. You will get compile time errors that clearly name the exception you have to catch with the line of code that could cause the exception/error. Then do the following:
try {
  // the code that could throw the exception
} catch ([the-name-exception] e) {
  e.printStackTrace();
  // or do something else relevant here - this code gets executed when the exception is thrown
} finally {
  // this is an optional block that is always executed before returning from the method (even if there was an exception thrown - do stuff like closing resources here
}where [the-name-exception] is the exception class I mentioned earlier.
You can also declare a method to throw the exception if you don't want to catch it. Just use the keyword "throws" followed by the class name of the exception. Then any place where you call the method will have to catch the exception.
You can also find out what exceptions are being thrown by looking in the JavaDocs. There is plenty more, but that is what you will need to get your program compiling.

Similar Messages

  • Macbook pro will not restart to download update instead goes straight to download? macbook pro will not restart to download update instead goes straight to update download probably simple setting prob but i dont know can some on help me i just replaced a

    Macbook pro will not restart to download update instead goes straight to download?
    macbook pro will not restart to download update instead goes straight to update download probably simple setting prob but i dont know can some on help me i just replaced a dieing hard drive and and im running on 08 software pleas help

    i replaced my hard drive and put osz back on now im trying to update but will not update supost to restart then update but instead of restarting it goeses to update and i have to shut it down pleas ignore typos im trippen

  • HT201303 when i try to purchase something it asks me to enter my security questions but i dont remeber them how can i reset them?

    when i try to purchase something it asks me to enter my security questions but i dont remeber them how can i reset them?

    Try here:
    iTunes Store: My credit card's security code or zip code does not match my bank's records

  • I bought my iphone from a lady at the mall but she didnt remember her icloud password well now i keep getting pop ups about the icloud password but she doesnt remember it and whenever i try turning it off it asks me for the password but i dont know it?

    i bought my iphone from a lady at the mall but she didnt remember her icloud password well now i keep getting pop ups about the icloud password but she doesnt remember it and whenever i try turning it off it asks me for the password but i dont know it?

    That is the activation lock. Your iPad will be useless unless you can remove it.

  • HT5577 my daughter set up my account, i know my password and id, but i dont know all the security questions nor the birthday she used. i am wanting to change my password, please help

    my daughter set up my account, i know my password and id, but i dont know the security questions she used. i am needing to change my password. please help

    Ask your daughter. Or:
    Alternatives for Help Resetting Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Customer Service: Contacting Apple for support in your
              country and ask to speak to Account Security.
    How to Manage your Apple ID: Manage My Apple ID

  • How can i get my password and security questions back? everytime i write my mail in iForgot it doesnt send the mail to  my account, why? someone hacked me but i dont know how.

    how can i get my password and security questions back? everytime i write my mail in iForgot it doesnt send the mail to  my account, why? someone hacked me but i dont know how.
    example;
    my apple mail: [email protected]
    and i write down the account in iForgot [email protected] but i never recieve the mail asking for the new password, why? someone hacked me and change that and the security questions, what can i do?

    Alternatives for Help Resetting Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Customer Service: Contacting Apple for support in your
              country and ask to speak to Account Security.
    How to Manage your Apple ID: Manage My Apple ID

  • HT201441 please help me try to contact the owner of this phone IMEI ****  ICCID **** i got his phone now with me but i dont know how to contact them first time

    please help me try to contact the owner of this phone IMEI ****  ICCID **** i got his phone now with me but i dont know how to contact them first time i got it low battery contact me
    I will explan more how i got this phone
    Call me +**** Micky Thai
    <Personal Information Edited By Host>

    A long shot but you might try using the phone to send an email to the phone asking the owner to call their mobile phone.  If the owner has a computer they may get the email and get in contact with you.
    But Roger's suggerstion of turning it over to the police is the best bet.
    OT

  • When i try to put apps on my ipod touch it says it not authorized for this computer and to go on the website and do it. but i dont know how?

    When i try to put apps on my ipod touch it says it not authorized for this computer and to go on the website and do it. but i dont know how?

    Hello Bobbie,
    Have you authorized your iTunes library yet to play and sync your iTunes purchases? To do this, head to the Store drop down menu and choose Authorize This Computer.  Then enter in your iTunes store account credentials and then try resyncing your iPod.
    B-rock

  • I pre-ordered an album and i did not get it! i payed 14 some dollars for it and never received it i checked to see if i bought it and it said i did. i looked to see if i could re download the album but i dont know how please help!

    I pre-ordered an album and i did not get it! i payed 14 some dollars for it and never received it i checked to see if i bought it and it said i did. i looked to see if i could re download the album but i dont know how please help!

    If you are in a country where music can be redownloaded then it should show in the Purchased tab in the iTunes store app on your phone, and the Purchased link under Quicklinks on the right-hand side of the iTunes store homepage on your computer's iTunes. If it doesn't show there then does the Store > Check For Available Downloads menu option on your computer's iTunes find it ?

  • I found an iphone 4 and tried to bypass the passcode but as i moved on to try and use this iphone, it says that i have to contact the owner to give me the apple id and password but i dont know the owner

    i have got an apple iphone 4 and want to use it...it says that i need to contact the owner of the iphone to give me the apple id and the password, but i dont know the owner because i found this iphone.....can you help me unlock this iphone ??

    It doesn't belong to you. Turn it over to the police. You can't bypass the activation lock. It's doing exactly what it's designed to do, which is to prevent scum like you from using a lost or stolen phone.

  • How do i reset my security questions? i dont know the answer and it wont let me buy anything until i answer them.

    I'm trying to buy new music on iTunes, but I cant because it wants me to answer my two security questions that i dont know the answer to. I looked it up in customer service, but it says i need some rescue email that i never set up. Im confused and i just want to buy new music!

    There is nothing that anyone in the forums can do for you. You have to contact iTunes Store Support about this now. You can email them from here. Click on iTunes Store support.
    http://www.apple.com/support/itunes/contact/
    Or you can try calling one of the phone numbers and ask for iTunes Support and explain what you are trying to do.
    http://www.apple.com/contact/

  • My HDD is full...but i dont know why

    I just got this T400 less than a month ago and already the HDD is full, but i dont know what its full with.
    Everything thats installed now either came with the laptop, or isn't big enough to fill up a 140 gig hard drive. The amount of free space seems to go down even when im not using the laptop. I'm really confused as to why this is happeneing and would appreciate some help.

    Agnryfaice, welcome to the forum,
    please have a look at this thread to see if it helps solve your problem.
    Hope this helps
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • I'm getting this warning,but i dont know where is it located.please let me know,where should i rectify this? WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!Enab

    i'm getting this warning,but i dont know where is it located.please let me know,where should i rectify this?
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    Hello,
    This seems not related to SQL Server but more related to Fusion or a missing DLL. The following resources may help you:
    http://blog.mediawhole.com/2010/08/enable-fusion-assembly-binding-logging.html
    http://jamesecampbell.blogspot.com/2011/11/how-to-enable-assembly-binding-logging.html
    http://www.codeproject.com/Tips/141281/WRN-Asssembly-binding-logging-is-turned-OFF
    http://stackoverflow.com/questions/5986930/assembly-binding-logging-is-turned-off
    Please verify if a missing DLL is specified before the "WRN: Assembly binding logging is turned OFF" message.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • HT4623 i tryed to update my i pad air and says to connect to i tunes but i dont know what to do

    it says to connect to i tunes but i dont know how and wahat to do please help right away

    What model iPad and what iOS version is it running?
    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 7.0.4. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update an iPad (except iPad 1) to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
    Tip 2 - If you're updating via wifi, place your iPad close to your router to preclude getting a corrupted download.
    How to Upgrade to iOS 7
    The iOS 7.0 update requires around 2.5 GB of storage space, so if your iPad is almost full, you may need to clear up some space. You can check your available space in Settings -> General -> Usage.
    There are two ways to upgrade to iOS 7: You can use your Wi-Fi connection, or you can connect your iPad to your PC and update through iTunes. We'll go over each method.
    To upgrade using Wi-Fi:
    Note: If your iPad's battery is under 50%, you will want to plug it into your charger while performing the update.
        1.    Go into the iPad's Settings.
        2.    Locate and tap "General" from the menu on the left.
        3.    The second option from the top is "Software Update". Tap this to move into the update settings.
        4.    Tap "Download and Install". This will start the upgrade, which will take several minutes and will reboot your iPad during the process. If the Download and Install button is grayed out, trying clearing up some space. The space required by the update is mostly temporary, so you should gain most of it back after iOS 7 is installed.
        5.    Once the update is installed, you may have to run through the initial steps of setting up your iPad again. This is to account for new features and settings.
    To upgrade using iTunes:
    First, connect your iPad to your PC or Mac using the cable provided when you purchased your device. This will allow iTunes to communicate with your iPad.
    You will also need the latest version of iTunes. Don't worry, you will be prompted to download the latest version when you launch iTunes. Once it installs, you may be asked to setup iCloud by logging into your iTunes account. If you have a Mac, you may be prompted on whether or not you want to enable the Find my Mac feature.
    Now you are ready to begin the process:
        1.    If you upgraded iTunes earlier, go ahead and launch it. (For many, it will launch automatically when you plug in your iPad.)
        2.    Once iTunes is launched, it should automatically detect that a new version of the operating system exists and prompt you to upgrade to it. Choose Cancel. Before updating, you will want to manually sync your iPad to make sure everything is up to date.
        3.    After canceling the dialog box, iTunes should automatically sync with your iPad.
        4.    If iTunes doesn't automatically sync, you can manually do it by selecting your iPad within iTunes, clicking on the File menu and choosing Sync iPad from the list.
        5.    After your iPad has been synced to iTunes, select your iPad within iTunes. You can find it on the left side menu under Devices.
        6.    From the iPad screen, click on the Update button.
        7.    After verifying that you want to update your iPad, the process will begin. It takes a few minutes to update the operating system during which time your iPad may reboot a few times.
        8.    After updating, you may be asked a few questions when your device finally boots back up. This is to account for new settings and features.
     Cheers, Tom

  • I bought a second hand ipod 5 and the original owner forgot the email and password and i can't restore the ipod and it says i need the original apple ID but i dont know it could anyone help me??

    i bought a second hand ipod 5 and the original owner forgot the email and password and i can't restore the ipod and it says i need the original apple ID but i dont know it could anyone help me??

    If you can access the device: Tap Settings -> General -> Reset -> Erase All Content and Settings.
    If you can't do that then you need to Restore it as New:
    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    Forgotten Restrictions Passcode Help
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    Also, see iTunes- Restoring iOS software.
    You can also try using DFU mode:
    Placing your device into recovery (DFU) mode:
    Follow these steps to place your iOS device into recovery mode. If your iOS device is already in recovery mode, you can proceed immediately to step 6.
       1. Disconnect the USB cable from the iPhone, iPad, or iPod touch, but leave the
           other end of the cable connected to your computer's USB port.
       2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds
           until the red slider appears, then slide the slider. Wait for the device to turn off.
                  * If you cannot turn off the device using the slider, press and hold the
                    Sleep/Wake and Home buttons at the same time. When the device turns off,
                    release the Sleep/Wake and Home buttons.
      3. While pressing and holding the Home button, reconnect the USB cable to the
           device. The device should turn on. Note: If you see the battery charge warning,
           let the device charge for at least ten minutes to ensure that the battery has some
           charge, and then start with step 2 again.
      4. Continue holding the Home button until you see the "Connect to iTunes" screen.
           When this screen appears you can release the Home button:
      5. If necessary, open iTunes. You should see the following "recovery mode" alert:
      6. Use iTunes to restore the device.
    If you don't see the "Connect to iTunes" screen, try these steps again. If you see the "Connect to iTunes" screen but the device does not appear in iTunes, see this article and its related links.
    Additional Information:
    If you have a problem getting into recovery mode then try: RecBoot: Easy Way to Put iPhone into Recovery Mode.
    Note: When using recovery mode, you can only restore the device. All user content on the device will be erased, but if you had previously synced with iTunes on this computer, you can restore from a previous backup. See this article for more information.

Maybe you are looking for

  • HT204394 How do i add a page to one of my documents?

    I am using Pages on my iPhone 5 and Pages on iCloud but I don't know how to add a page to my document on either of them. Please help me!

  • I am designing query based on dso

    Hi,          i am designing query based on dso. in my query  production orders have multiple operations.when i execute my query report is showing only latest operations.we need to all operation.how can i fetch. ex :   production order                

  • So... I cannot watch movie on DVD on my HDTV?

    With a cable from my MacBook to my HDTV, I can watch a movie on DVD or anything that I  to pull up the MacBook.  Now, unless I am wrong, I cannot use the setup Apple TV instead of the cable?   Reading over what Apple says about the Apple TV, I though

  • CC desktop keeps me logged out, wont let me log in

    CC desktop is keeping me logged out...will not let me log in.  I went online and was able to sign in fine, changed my password....still won't let me log in??????

  • Can we add extra row in colorpicker?

    Hi all, I want to add one extra row below all colors in color picker. If you have seen word color picker, it shows you recently used colors. Is it possible to add extra row in color picker? Thanks, -Chandu