I redid the aplication and I am posting the error with it

This is the code that I have now and the error underneath it,
import javax.swing.JOptionPane;
public class DoubleArray {
public static void main(String args[])
          double Array[]={10.0,1.0,27.34,1000.0,44.05,5.33,69.74,
          99.99,55.5,7.98};
          int Largest=0;
String output= "The smallest number is: " + Array[0]+
"\nThe largest number is: " + Array[Array.length-1];
public void bubbleSort(double array1[]){
for (int pass=1;pass<array1.length;pass++){
     for (int element=0;element<array1.length-1;element++){
          if (array1[element]>array1[element+1])
          swap(array1,element,element+1);
public void swap(double array2[],int first, int second)
     int hold;
     hold=array2[first];
     array2[first]=array[second];
     array2[second]=hold;
bubbleSort (Array[])
JOptionPane.showMessageDialog(null,output,
     "Arrays",JOptionPane.INFORMATION_MESSAGE);
     System.exit(0);
} //end class
here the error:
DoubleArray.java [21:1] illegal start of expression
public void bubbleSort(double array1[]){
^
1 error

public class DoubleArray {
  public static void main(String args[]) {
     public void bubbleSort(double array1[]){
       for (int pass=1;pass<array1.length;pass++){
         ...You can't put a method inside of another method.

Similar Messages

  • HT1491 I purchased a year subscription for Huffington Post Magazine $19.99 and when I go to the Newsstand and try to read the latest issue it tells me I have to pay $0.99?

    I purchased a year subscription for Huffington Post Magazine $19.99 and when I go to the Newsstand and try to read the latest issue it tells me I have to pay $0.99?

    They are only free via the account orginally purchased or if they came pre installed on the computer. Depending on what you have purchased already us the one account for the app store - saves headace and hassel in the future thus not double buying software. Do you have iwork installed on your imac? meaning the iwork 09? if you do your should be able to to to the store and update it. Worked fine for me since i bought the DVD version of iwork 09 and Aperture 3. I did not want to have to rebuy them so the app store noticed i had them installed and changed the update via the app store.

  • I need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by ste

    i need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by step explanation please beginner

    Please post (a relevant section of) it right on this Forum.

  • TS3212 Today, 01/23/2014, I tried updating iTunes, as I got a messsage that update was available. The update did not download correctly the  message to uninstall iTunes and reinstall it. After the uninstall and reinstall I got an error message, please hel

    Today, 01/23/2014, I tried updating iTunes, as I got a messsage that update was available. The update did not download correctly I got the message to uninstall iTunes and reinstall it. After the uninstall and reinstall I got an error message, that stated: The program can't start because MSVCR80.dll is missing from your computer. Try reinstalling the program fo fix. then I got the message, iTunes was not installed correctly. Please reinstall iTunes. Error 7 (windows error 126) I have had iTunes since I purchased the iphone in 2012. I have only updated the product since then until today when I did the uninstall ans reinstall as stated in above directions. I am not sure what is different now. please help

    I had this problem as well but found the soultion on another post from turingtest2 - it worked for me:
    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (Later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or by right-clicking the downloaded installer and selectingRun as Administrator.
    See also HT1925: Removing and Reinstalling iTunes for Windows XP or HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

  • Hi im having huge problems trying to install flash for my mac 10.5 imac, iv gone through the internet and tried all of the solutions, everytime i try to install flash it says cant read the download file, or it just wont install, anybody plz help!

    hi im having huge problems trying to install flash for my mac 10.5 imac, iv gone through the internet and tried all of the solutions, everytime i try to install flash it says cant read the download file, or it just wont install, anybody plz help!
    iv unistalled flash, iv checked plug ins it just wont work,

    It would have been a great help to know precisely what Mac you have, so some of the following may not apply:
    You can check here:  http://www.adobe.com/products/flash/about/  to see which version you should install for your Mac and OS. Note that version 10,1,102,64 is the last version available to PPC Mac users*. The latest version,10.3.183.23 or later, is for Intel Macs only running Tiger or Leopard, as Adobe no longer support the PPC platform. Version 11.4.402.265 or later is for Snow Leopard onwards.
    (If you are running Mavericks: After years of fighting malware and exploits facilitated through Adobe's Flash Player, the company is taking advantage of Apple's new App Sandbox feature to restrict malicious code from running outside of Safari in OS X Mavericks.)
    * Unhelpfully, if you want the last version for PPC (G4 or G5) Macs, you need to go here:  http://kb2.adobe.com/cps/142/tn_14266.html  and scroll down to 'Archived Versions/Older Archives'. Flash Player 10.1.102.64 is the one you download. More information here:  http://kb2.adobe.com/cps/838/cpsid_83808.html
    You should first uninstall any previous version of Flash Player, using the uninstaller from here (make sure you use the correct one!):
    http://kb2.adobe.com/cps/909/cpsid_90906.html
    and also that you follow the instructions closely, such as closing ALL applications (including Safari) first before installing. You must also carry out a permission repair after installing anything from Adobe.
    After installing, reboot your Mac and relaunch Safari, then in Safari Preferences/Security enable ‘Allow Plugins’. If you are running 10.6.8 or later:
    When you have installed the latest version of Flash, relaunch Safari and test.
    If you're getting a "blocked plug-in" error, then in System Preferences… ▹ Flash Player ▹ Advanced
    click Check Now. Quit and relaunch your browser.
    You can also try these illustrated instructions from C F McBlob to perform a full "clean install", which will resolve the "Blocked Plug-in" message when trying to update via the GUI updater from Adobe.
    Use the FULL installer for 12.0.0.44:  Flash Player 12 (Mac OS X)
    And the instructons are here: Snow Leopard Clean Install.pdf
    (If you are running a PPC Mac with Flash Player 10.1.102.64 and are having problems with watching videos on FaceBook or other sites, try the following solution which fools the site into thinking that you are running the version 11.5.502.55:)
    Download this http://scriptogr.am/nordkril/post/adobe-flash-11.5-for-powerpc to your desktop, unzip it, and replace the current Flash Player plug-in which is in your main/Library/Internet Plug-Ins folder, (not the user Library). Save the old one just in case this one doesn't work.

  • How to show the First and Last name of the user instead of user name

    Gurus,
    We have the full email id of the user as the portal user name. Right now we are using the "Item Attributes - Current User" to show the user name. We don't want to show this anymore. We would like to show the First and Last name of the user on the Portal page. How can i do this. Please post a reply if you have some idea about it.
    Thanks
    Raj
    ---------

    I believe this is possible using the security APIs. See http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/PLSQL/DOC/PLDOC_9026/INDEX.HTML and look for person_info (Returns user information, given a user name)
    under wwsec_api
    Suggest posting any follow-up questions to the Security forum - http://forums.oracle.com/forums/forum.jsp?forum=6

  • Red highlight next to code in dreamweaver. What is wrong with the code and is it affecting the websi

    What is wrong with the code and is it affecting the website?

    Line 107 looks dodgy to me and it won't have any effect on your code.  However, it is a good idea to post a complete link to your CSS for us to see it in full and to validate it using external tools.  In fact, you could validate the CSS (and HTML) yourself..
    <http://jigsaw.w3.org/css-validator/>
    Good luck.

  • Stop the viewer having the ability to click/touch anywhere on the page and it going to the next page

    I have created a PDF with links to various pages so that it can be used on a touch screen. I need to be able to stop the viewer having the ability to click/touch anywhere on the page and it going to the next page. In Keynote you select a check box that says : "Hyperlinks only" is their something similar in PDF?

    You can upload it to a file-sharing website (Acrobat.com, DropBox, etc.)
    and post the link here, or you can send it to me privately at
    [email protected] .

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi Rai,
    You should post this into the LabVIEW forum rather than Real-Time since this isn't a Real-Time application. Your post will see more replies in the LabVIEW forum. 
    As far as your question is concerned, you can write the max and min from the respective loops to a local variable to send the data out of the loops to a third loop or just do the calculation in one of the loops. This would be ideal if you're trying to do this while the loop is running. 
    -Jayk
    Applications Engineering
    National Instruments

  • My ipad is on an infinite loop.  I used ios7 for a few days and then did updates on some of my apps. that's when the infinite loop started.  I have tried pressing the power and home button at the same time, but it doesn't work. Please help!

    my ipad is on an infinite loop.  I used ios7 for a few days and then did updates on some of my apps. that's when the infinite loop started.  I have tried pressing the power and home button at the same time, but it doesn't work. Please help!
    I even tried some hints posted for ios6 (turn off Ipad, holding home button and plugging in power cord at the same time and then releasing the home button)
    I did manage to get a different screen that shows the itunes icon and a power cord, but nothing happens.

    You were on the right track. You got the connect to iTunes screen and you ended to use iTujes to restore your iPad. Try recovery mode again.
    Recovery Mode Instructions
    Disconnect the USB cable from the iPad, but leave the other end of the cable connected to your computer's USB port.
    Turn off iPad: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for iPad to turn off.
    If you cannot turn off iPad using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When the iPad turns off, release the Sleep/Wake and Home buttons.
    While pressing and holding the Home button, reconnect the USB cable to iPad. When you reconnect the USB cable, iPad should power on.
    Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears you can release the Home button.
    If necessary, open iTunes. You should see the recovery mode alert that iTunes has detected an iPad in recovery mode.
    Use iTunes to restore iPad.

  • I have a 2005 Jaguar xj8.  When I tried to upgrade my 3gs to a 4g I got a ticking noise in the speaker and no one on the other end could hear me.  I had to go back to a 3gs.  My phone is shot and I need to upgrade.  Has there been a fix to the problem?

    I have a 2005 Jaguar xj8.  When I tried to upgrade my 3gs to a 4g  two years ago, I got a ticking noise in the speaker and no one on the other end could hear me.  I had to go back to a 3gs.  My phone is shot and I need to upgrade.  Has there been a fix to the problem?  Apple told me there was some sort of interference with the airbag system.  Jaguar was totally unhelpful.

    Hi Labjock,
    Welcome to the Support Communities!
    The article below may be able to help you with this. 
    iPhone: Microphone issues
    http://support.apple.com/kb/ts5183
    Cheers,
    - Judy

  • I'm trying to download itunes 10 but I get to a point in the download and it tells me, "The feature you are trying to use is on a network resource that is unavailable" but I haven't had itunes on my computer for a year now so how can I get around this?

    I'm trying to download itunes 10 but I get to a point in the download and it tells me, "The feature you are trying to use is on a network resource that is unavailable" but I haven't had itunes on my computer for a year now so how can I get around this?

    iTunes.msi
    Perfect, thanks.
    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Iv downloaded the 0845 wizard from the App Store. Registered my details and it has been working. But for some reason it won't let me log in and keep saying failed every time I try to use it. Iv deleted and re-downloaded the app and it still says the same?

    Iv downloaded the 0845 wizard from the App Store. Registered my details and it has been working. But for some reason it won't let me log in and keep saying failed every time I try to use it. Iv deleted and re-downloaded the app and it still says the same?

    I would say to start by looking on their web site... unfortunately, that appears to be dead.
    Based on the horrible ratings on the App Store (1 star for the current version), I'm not surprised it doesn't work well.

  • I have a Macbook Air that had some coffee spilled on the keyboard and as a result the plus/equals key is no longer functioning. Can I use a program like Ukelele to reprogram a different key to be my plus/equals key? Can I program a function key? key

    I have a Macbook Air that had some coffee spilled on the keyboard and as a result the plus/equals key is no longer functioning. Can I use a program like Ukelele to re-program another key to do that function? Can I re-program a function key to do this function?

    Water + electronics do not mix.  Something was damaged insode, and the logic board may be corroding as is.
    Take it to a Genius Bar for an evaluation and repair estimate.
    This is accidental damage and not covered by warranty.

  • I had renamed my user login name and assumed that there will be no change in the settings and files. When I login with the new profile name everything is gone. How can I get back all my files and settings?

    I had renamed my user login name and assumed that there will be no change in the settings and files. When I login with the new profile name everything is gone. How can I get back all my files and settings? Please help. Thanks.

    You should have asked this before you tried: Changing username or short name- User Account and Short Name- OS X- How to change user account name or home directory name.

Maybe you are looking for

  • Report Writer: How to Edit the allowable GenData Selection from a Library

    Hello guys, Recently I am trying to copy the Report  List: <b>Total Plan/Actual/Commitments ( 6OPL-001 ) </b> (not sure if this is SAP standard or not) from the Library <b>6O2</b>.  I want to add the Business Area as part of the selectable parameter

  • "This product is not available in the Finnish store" comes up all the time

    Have not been able to download even one song for weeks from the music store - all that happens is it gives me the above message. Anybody have any clue to what's going on here???   Windows XP  

  • Need to create MMR in back date

    Dear Gurus, The issue is we went live on 01.07 and now on 6th we realized that some materials, their stocks and their prices were not uploaded. The only thing we can do now is create them as of today. But accounts ppl want to have a trail balance as

  • T61 - WWAN does not connect when resuming from sleep mode

    Hi. I have a T61 with integrated WWAN, which works perfectly - except I use sleep mode a lot, and when i resume from sleep mode, WWAN doesn't connect, I always get the same error - IP configuration failed. If I restart my OS, WWAN works normally agai

  • Waveform IRE Level Over 100 on Sony A77 but not for Canon T2i

    Why does the Sony A77 have a white IRE level over 100 while the Canon T2i max out at 100? You can view this larger if you like so you can see the graph better, http://www.flickr.com/photos/davedugdale/6326846722/. On my Canon I have highlight tone pr