This program is showing errorss

hi,
Can any one tell why this program is showing errorss
class A {
    /** Creates a new instance of a */
  int i=10;
  int j;
  try
       i= 20/0;
  catch (ArithmeticException a)
      System.out.println(a);
class exp1
     public static void main(String[] args)
          A x = new A();
          System.out.println(x.i);
       System.out.println("after try  ");
}it is showing error as
exp.java:19: illegal start of type
try
exp.java:26: <identifier> expected
}

class A {
    /** Creates a new instance of a */
  public int i=10;
  public int j;
  A(){
  try
       i= 20/0;
  catch (ArithmeticException a)
      System.out.println(a);
public class exp1
     public static void main(String[] args)
          A x = new A();
          System.out.println(x.i);
       System.out.println("after try  ");
}

Similar Messages

  • The bookmarks simply don't show in the sidebar. What is with this program, I thought it was supposed to be a good one. The bookmarks are totally unintuitive. How do you get any of your bookmarks to show?

    I thought this program was supposed to be so great. The bookmarks are totally unintuitive. I tried to import favorites from Explorer, can only see them if I bring down the menu from the top and select imported bookmarks. When I select Organize bookmarks, it is empty. No bookmarks show at all on the left. Does this sidebar actually work? Can you bring your imported bookmarks onto the sidebar? Can you organize it the way you want in the order you want to see them, as you can in Explorer? I am no big fan of Exploroer, which is why I am trying Firefox, but if bookmarks cannot be easily used, the program is worthless. Any herlp would be appreciated.

    Thanks - I had same problem with newly-imported Bookmarks from IE which didn't show in the sidebar. I have opened the Bookmarks Menu and all is OK.

  • HT1338 The Mac App Store shows an update available for iMovie but when I click "update" it gives me this message, "The product distribution file could not be verified. It may be damaged or was not signed." What can I do to update this program?

    The Mac App Store shows an update available for iMovie but when I click "update" it gives me this message, "The product distribution file could not be verified. It may be damaged or was not signed." What can I do to update this program?

    http://www.apple.com/support/mac/app-store/contact.html?form=account

  • Using Mavericks OS, purchased program through App Store of which had problems with current OS, therefore deleted program with intent on reinstalling same from App Store, I am unable to redownload this program because it is greyed out and shows installed.

    Purchased application in App Store (Opus Domini). Did not play will with OS X Mavericks. Deleted program to re-download from App Store. However my list of purchases shows this program as installed and is greyed out. Need to re-download. Have talked with company and they are working on an update for OS however this will take some time.
    Thanks.

    An app is considered to be installed if it shows up in a Spotlight search of local volumes. Bring up a search window in the Finder by pressing the key combination command-F. Search This Mac for the name of the application. Delete all copies that are found.

  • I am trying to burn a .mov file from fcp xpress timeline to a dvd.  The popup message I receive prior to inserting the dvd is that I need 20.05 gb of space available on dvd (a 1.25 min). How can I get this program onto a dvd that shows a max of 8.5gb?.

    I am trying to burn a .mov file from fcp xpress timeline to a dvd.  The popup message I receive prior to inserting the dvd is that I need 20.05 gb of space available on dvd (a 1.25 min program). How can I get this program onto a dvd (where the max available gb's  for off the shelf dvds-r)  shows a max of 8.5gb?.  Please help.  Thank You!

    You have posted your question in the Final Cut  Pro X forum. You want to be in this forum instead; https://discussions.apple.com/community/professional_applications/final_cut_expr ess_hd
    Good luck.
    Russ

  • Error message "This program cannot display the webpage when uploading images to Cafe Press

    I have had a Café Press shop for five years and except for sometimes being slow, no problems uploading images. Now, suddenly for 3 days I get the message "This program cannot display the webpage
    Most likely causes:
    • You are not connected to the Internet.
    • The website is encountering problems.
    • There might be a typing error in the address.
    What you can try:
    Check your Internet connection. Try visiting another website to make sure you are connected.
    Retype the address."
    I got the messsage about half way through the uploading of an image. People suggested using "firefox" instead of IE so I now get a similar error message from Firefox. I signed in, clicked on the image I wanted to upload and hit "upload" and get message as follows:
    Server not found
    Firefox can't find the server at members.cafepress.com.
    * Check the address for typing errors such as
    ww.example.com instead of
    [url=http://www.example.com]www.example.com[/url]
    * If you are unable to load any pages, check your computer's network connection.
    * If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
    None of this makes sense because I WAS connected to the internet (obviously) or I wouldn't have been able to sign in, go to my media basket, browse for the image and click "upload" and watch as the progress bar showed percentage of upload such as 20%, etc. and even went to 100% at times before giving me the error message. Plus I couldn't make a typing error since I wasn't typing anything but uploading an image. Any suggestions?
    Whatever your suggestion, I need step by step instructions as I am totally computer illiterate. I don't even know what a "proxy" is and don't know if I have a "firewall" as the message suggests. I have "Comodo" security and am using Windows XP.
    I contacted CP which was no help at all. All they did was tell me to clear my cache which I do after every session. Thanks
    Nancy
    http://www.cafepress.com/calendarflr

    Sounds like your desktop application is in fact running from
    a server. CHMs were identified as a security risk by Microsoft and
    are best suited to the user's PC.
    Click
    here for more information.

  • Payment method(s) are not allowed for this program / Program RFFOAVIS_FPAYM

    Dear Friends,
    In Se38  abap editor, I entered the program RFFOM100, i entered the details program run date,identification future,paying company code,payment methods T, House bank, Account Id and executed the program. I am getting the error 'Payment method(s) are not allowed for this program'.
    Payment method S is not used in F110, It was not mentioned in vendor master or vendor invoice.It is not mentioned in fbzp in bank determination. When i tried to delete payment method 'S' the system shows a message Payment Method S is being used in the company code.
    In  the program RFFOAVIS_FPAYM, i entered the details program run date,identification future,paying company code,payment methods T, House bank, Account Id and executed the program. I am getting the error  'Program RFFOAVIS_FPAYM: No records selected'. But there open items or invoices.
    Please suggest how to resolve the errors.
    Regards
    Sridhar

    Hello,
    Why are you directly executing these programs?
    You will not expect these program to execute directly by going to SE38.
    I would have configured the relevant payment methods in the country with DME structure or classical RFFO* programs, which in turn pick up the inherent programs at the time of running F110.
    For example, if you need to generate BACS file for country GB, either you copy the GB_BACS to ZGB_BACS or use GB_BACS directly in FBZP settings.
    Make sure that you have maintained OBPM1 / OBPM2 / OBPM3 and OBPM4 settings properly.
    The system automatically gives the access to system RFFOAVIS_FPAYM. Prepare a variant against this program in F110. Relevant file gets generated to folder path mentioned in OBPM4 will get generated. The file get generated can be seen in AL11.
    Hope this is informative and solves your issue.
    Regards,
    Ravi

  • Firefox crashes when I try to use DataLoad, and I was able to use this program a month ago.

    In the recent past I have been able to use a program called DATALOAD (shareware) to load data into Firefox web forms (specifically web based sales tax returns).
    However, now every time I try it now Firefox crashes, so I am forced to use IE (which I hate). The last time I used Dataload was in April 2011 (for my quarterly tax returns).
    On of the latest updates to Firefox must have a conflict with this program.
    Can you please research to see what changed in Firefox to make it crash when using Dataload? I do not want to use IE if I do not have to.

    Hmmm, That is very odd. What is the link you are using? Are you logged
    in to YouTube?
    Many site issues can be caused by corrupt cookies or cache.
    * Clear the Cache and
    * Remove Cookies<br> '''''Warning ! ! '' This will log you out of sites you're logged in to.'''
    Type '''about:preferences'''<Enter> in the address bar.
    * '''Cookies;''' Select '''Privacy.''' Under '''History,''' select Firefox will '''Use Custom Settings.''' Press the button on the right side called '''Show Cookies.''' Use the search bar to look for the site. Note; There may be more than one entry. Remove '''All''' of them.
    * '''Cache;''' Select '''Advanced > Network.''' Across from '''Cached Web Content,''' Press '''Clear Now.'''
    If there is still a problem,
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Type '''about:preferences#advanced'''<Enter> in the address bar.
    Under '''Advanced,''' Select '''General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?
    Then restart.

  • Can someone help me with this program?

    Can someone make this program for me?
    Make a Java-webapplication containing a few webpages (html-files and servlets, but NO jsp's). With this application you can get bankdata from a database, for example:
    page 1: html-file: Welcome on the website, type your bankaccount and password
    page 2: error if bankaccount doesn't exist or wrong password
    page 3: welcome with name and option to choose for your balance or a list with transactions from that account (the user can give a starting date)
    page 4: showing the balance or the list with transactions, name and accountnumber
    Store the information about the account and name in sessionsvariables
    the database is an access-file with two tables
    table Accounts with colums: accountnumber, name, balance and password
    table Transactions with colums: accountnumber, amount, plus/minus, date, sorttransaction and contra-account
    (when I need to send you the database by mail, you can ask me ...)
    maybe someone can help me,
    thanks in advance
    greetings Bastiaan

    Sure we can help you. Post the code you have already and explain any problems you are currently having together with any and all complete compiler error messages and/or exceptions.
    But no, we are not going to do your homework for you.

  • This program won't work for some reason

    I'm having trouble with getting this program to do what I want. It reads in a file and identifies certain parts that follow the rules I've given. The first version below is one that works. It simply prints out the string if it meets the conditions in the if statements. The second one will compile but shows no data. I know it stores the values in the arrays sortstem and sortdg becuase I put the println statement directly after the code for storing them and it worked. However, when I put it where it is now, it will not work. Any suggestions? Also, I get an error after the program runs for both versions: It says exception in thread "main" Java.lang.NullPointerException at tokens.main(tokens.java.69) (this was for the first program).
    import java.io.*;
    import java.util.*;
    class tokens {
         public static void main(String args[]) throws IOException {
              int i;                                                       //int to read in the data from the text file
              int count = -1;
              int countt = -1;
              int countc = 0;                                                  //int to put data into a char array
              FileInputStream fin;                                             //input stream
              char array[] = new char[10000];                                        //array to hold chars from the text file
              String s;                                                  //chars are transfered to this String
              int index;                                                  //index of the names I'm searching for in the string
              String tokens[] = new String[10000];                    
              try {
                   fin = new FileInputStream(args[0]);
              } catch (FileNotFoundException e) {
                   System.out.println("File not Found");
                   return;
              } catch (ArrayIndexOutOfBoundsException e) {
                   System.out.println("Usage: ShowFile File");
                   return;
              do {
                   i = fin.read();
                   if (i != -1) {
                        if (count==array.length-1) {                              //this expands the array if more space is needed
                             char temp[] = new char[array.length+5000];
                             for (int j = 0; j < array.length; j++) temp[j] = array[j];
                             array = temp;
                             array[++count] = (char) i;
                        else
                             array[++count] = (char) i;                         
              } while(i != -1);
              fin.close();
              s = new String(array);
              StringTokenizer st = new StringTokenizer(s);                                                            
              while (st.hasMoreTokens()) {
                   if (countt==tokens.length-1) {                              //this expands the array if more space is needed
                             String temp1[] = new String[tokens.length+5000];
                             for (int j = 0; j < tokens.length; j++) temp1[j] = tokens[j];
                             tokens = temp1;
                             tokens[++countt] = st.nextToken();
                        else
                             tokens[++countt] = st.nextToken();     
              if (tokens[4].startsWith("stem")) {
                   if (tokens[4].equals(tokens[201])) {      //Skip this one
                   else
                        if ((tokens[9].equals("32")) && (tokens[15].equals("31"))
                        && (tokens[21].equals("30")) && (tokens[27].equals("29"))
                        && (tokens[33].equals("28")) && (tokens[39].equals("27"))) {
                             System.out.println(tokens[4]);
              for (int k = 201; k < tokens.length-198; k++) {
                   if (tokens[k].startsWith("stem")) {
                        if ((tokens[k].equals(tokens[k+197])) || (tokens[k].equals(tokens[k-197]))) {
                             //Skip this one
                        else
                             if ((tokens[k+5].equals("32")) && (tokens[k+11].equals("31"))
                             && (tokens[k+17].equals("30")) && (tokens[k+23].equals("29"))
                             && (tokens[k+29].equals("28")) && (tokens[k+35].equals("27"))) {
                                  System.out.println(tokens[k]);
    }This one below compiles but doesn't print to the screen.
    import java.io.*;
    import java.util.*;
    class tokenstest {
         public static void main(String args[]) throws IOException {
              int i;                                                       //int to read in the data from the text file
              int count = -1;
              int countt = -1;
              int countc = 0;                                                  //int to put data into a char array
              FileInputStream fin;                                             //input stream
              char array[] = new char[1000000];                                        //array to hold chars from the text file
              String s;                                                  //chars are transfered to this String
              int index;                                                  //index of the names I'm searching for in the string
              String tokens[] = new String[200000];
              String sortdg[] = new String[500];     
              String sortstem[] = new String[500];                         
              try {
                   fin = new FileInputStream(args[0]);
              } catch (FileNotFoundException e) {
                   System.out.println("File not Found");
                   return;
              } catch (ArrayIndexOutOfBoundsException e) {
                   System.out.println("Usage: ShowFile File");
                   return;
              do {
                   i = fin.read();
                   if (i != -1) {
                        if (count==array.length-1) {                              //this expands the array if more space is needed
                             char temp[] = new char[array.length+5000];
                             for (int j = 0; j < array.length; j++) temp[j] = array[j];
                             array = temp;
                             array[++count] = (char) i;
                        else
                             array[++count] = (char) i;                         
              } while(i != -1);
              fin.close();
              s = new String(array);
              StringTokenizer st = new StringTokenizer(s);                                                            
              while (st.hasMoreTokens()) {
                   if (countt==tokens.length-1) {                              //this expands the array if more space is needed
                             String temp1[] = new String[tokens.length+5000];
                             for (int j = 0; j < tokens.length; j++) temp1[j] = tokens[j];
                             tokens = temp1;
                             tokens[++countt] = st.nextToken();
                        else
                             tokens[++countt] = st.nextToken();     
              if (tokens[4].startsWith("stem")) {
                   if (tokens[4].equals(tokens[201])) {      //Skip this one
                   else
                        if ((tokens[9].equals("32")) && (tokens[15].equals("31"))
                        && (tokens[21].equals("30")) && (tokens[27].equals("29"))
                        && (tokens[33].equals("28")) && (tokens[39].equals("27"))) {
                             sortstem[countc] = tokens[4];
                             sortdg[countc] = tokens[3];
                             countc++;
              for (int k = 201; k < tokens.length-198; k++) {
                   if (tokens[k].startsWith("stem")) {
                        if ((tokens[k].equals(tokens[k+197])) || (tokens[k].equals(tokens[k-197]))) {
                             //Do nothing
                        else
                             if ((tokens[k+5].equals("32")) && (tokens[k+11].equals("31"))
                             && (tokens[k+17].equals("30")) && (tokens[k+23].equals("29"))
                             && (tokens[k+29].equals("28")) && (tokens[k+35].equals("27"))) {
                                  sortstem[countc] = tokens[k];
                                  sortdg[countc] = tokens[k-1];
                                  countc++;
              for (int z = 0; z < countc; z++) {
                   System.out.println(sortstem[z]);
              for (int z = 0; z < countc; z++) {
                   for (int y = z+1; y < countc; y++) {
                        if (sortdg[z].compareTo(sortdg[z]) > 0) {
                             String tdg = sortdg[z];
                             String tstem = sortstem[z];
                             sortdg[z] = sortdg[y];
                             sortstem[z] = sortstem[y];
                             sortdg[y] = tdg;
                             sortstem[y] = tstem;
              for (int j = 0; j < 20; j++) {
                   System.out.println(sortstem[j] + ": dG = " + sortdg[j]);
              System.out.println("Test");
    }

    I'm still having trouble with the println in this program. For some reason, in this section of the code, if I put System.out.println(sortstem[0]); inside the for loop, it works fine. But if I try to do it ouside of this loop, it will not work. The only thing I can think of is that the variable is only available inside the loop but I just can't figure it out. Can anyone enlighten me?
    for (int k = 201; k < tokens.length-198; k++) {
                   if (tokens[k].startsWith("stem")) {
                        if ((tokens[k].equals(tokens[k+197])) || (tokens[k].equals(tokens[k-197]))) {
                             //Do nothing
                        else
                             if ((tokens[k+5].equals("32")) && (tokens[k+11].equals("31"))
                             && (tokens[k+17].equals("30")) && (tokens[k+23].equals("29"))
                             && (tokens[k+29].equals("28")) && (tokens[k+35].equals("27"))) {
                                  sortstem[countc] = tokens[k];
                                  sortdg[countc] = tokens[k-1];
                                  countc++;
    [code/]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

  • There is not enough free memory to run this program

    Hi all,
    I am running into an issue with OfficeXP SP3 that has been virtualized using ZAV 8.0.1 and registered using the msi method. First, when you try to open a document from a web browser (Firefox in my case) it will open the downloads window and show the file but never launch the virtualized Office. Then if you try double-clicking on the document in the downloads window, nothing happens. If you open the folder that the document was saved to and double-click on it nothing happens. If you go into open with and choose the virtualized officexp it gives this error: "There is not enough free memory to run this program. Quit one or more programs, and then try again."
    Now here is the really odd thing, you can double-click on a word/excel/etc document in MyDocuments, a network drive, anywhere and it will open the appropriate officexp application just fine. I will also mention that firefox is virtualized as well but the same process works fine with openoffice.org.
    This also happens if you choose to save the file to a specific location. It cannot be opened. However I just discovered that if you move it to somewhere else, say the desktop, it will open just fine.
    Anyone have an idea what might be causing this issue? Is it somehow related to the sandbox?
    Thanks,

    Look in the class section of the registry for the FF virt app... See if some of the same extentions are in there.
    I would guess that FF has its own file associations for those document types and that is whats failing.
    If you remove the file association conents (but leave the folder and set isoation to writecopy) then the FF virt should be able to view and use the workstation file associations for the virt XP.

  • AirDrop. Has anyone had a problem with getting this program to run consistently?

    I have had numerous case openings with this product. I love it when it works, but for some reason, my mac and mac book pro can no longer see each other when the application is opened. Both are running the current 10.8.2 upgrade and both are between 2-3 years old and air drop is supported on both. No one has been able to figure this out! I've gotten to the point where I absolutely need this program because of its simplicity and speed in transferring big files like adobe illustrator files for example. Please help!!

    Review your hardware again from Apple's AirDrop criteria here.
    Supporting information on AirDrop usability and workflow. It uses Wi-Fi. Do you have Wi-Fi interference when it isn't working the way you expect?
    If you would like to enable AirDrop for wired and wireless, here is an article that shows how to do that from the command line in Terminal. This side-steps any issue where the machine has wireless deemed to old for AirDrop support.
    And here is a Bash script that I wrote to implement the above wired/wireless AirDrop solution. Copy and paste this into a text editor. Save it as airdrop.sh. Make it executable, and run it as: ./airdrop.sh ON
    #! /bin/bash
    # airdrop.sh - turn on or off the AirDrop feature in OS X.
    # airdrop.sh ON or airdrop.sh OFF
    case "$1" in
        ON)
        /usr/bin/defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1
        echo "AirDrop facility enabled"
        killall Finder
        OFF)
        /usr/bin/defaults write com.apple.NetworkBrowser BrowseAllInterfaces 0
        echo "AirDrop facility disabled"
        killall Finder
        echo "Usage: $0 {ON|OFF}"
        exit 1
    esac
    exit 0

  • I have a program that requires Java 6.  I am running 10.8.2, How do I remove Java 7 to run this program?

    I have a program that requires Java 6.  I am running 10.8.2, How do I remove Java 7 to run this program?

    Try going to the Oracle site - they did have a page showing how to remove Java 7 using the terminal program.
    I followed their instructions and it didn't work for me, but you may have better skills and luck than I.
    This was my starign point;
    http://www.java.com/en/download/help/mac_uninstall_java.xml
    Let us know if this works.

  • I just updated to 10.8.4 and my mail program is showing a series of boxes with AAAAs inside them instead of the email addresses. Also when on Safari web pages are displaying the same AAAAAs instead of type. Firefox displays fine. Can someone help me?

    I just updated to 10.8.4 and my mail program is showing a series of boxes with AAAAs inside them instead of the email addresses. Also when on Safari web pages are displaying the same AAAAAs instead of type. Firefox displays fine. Can someone help me?

    Restart your Mac and immediately hold down the Shift key when you hear the startup chime to boot into Safe Mode. Keep holding the Shift key until you see a progress bar towards the bottom of the screen. You can let go of the Shift key at that point.
    OS X asks you to log in (you will get this screen on a Safe Mode boot even if your Mac is set to automatically log in). Let the Mac finish booting to the desktop and then restart normally. This will clear Font Book's database and the cache files of the user account you logged into in Safe Mode.
    Next, close all running applications. From an administrator account, open the Terminal app and enter the following command. You can also copy/paste it from here into the Terminal window:
    sudo atsutil databases -remove
    Terminal will then ask for your admin password. As you type, it will not show anything, so be sure to enter it correctly.
    This removes all font cache files. Both for the system and the current user font cache files. After running the command, close Terminal and immediately restart your Mac.

  • Really stuck on how to start this program

    Okay, I know I should be posting some code here and showing where I've started and such, but I'm pretty lost as to how to start this program. Here's the problem:
    2. Making Change:
    This application, named ChangeMaker, will take as input a product price and an amount paid,
    both floating-point numbers representing euro and cent amounts. The application computes and prints the amount of change due the user, and also expresses the change amount in number of 2-euros, 1-euro, 20-cent, 10-cent, 5-cent, 2-cent, and1-cent coins.
    (Assume no change is given in bills, only in coins.)
    For example:
    Enter product price: 2.32
    Enter amount paid: 5.00
    Your change is 2.68 euros
    1 x 2 euro
    3 x 20-cent
    1 x 5 cent
    1 x 2 cent
    1 x 1 cent
    You can assume that the amount paid is greater than the product price, and that both inputs are
    "euro and cent" amounts: positive numbers with at most two decimal places.3
    Now, I know how to print the line asking for product price and enter amount paid, but I cannot figure out how to set up the rest of the code when switching from american USD dollars/coins to euros. I looked up the conversions and they are just intimidating as all get out when trying to take the equivalency of euros to each dollar thats entered and then taking the rest of the USD remainders and represent that in USD coinage. >.< Help is much appreciated thank you.

    thomas.behr wrote:
    random0munky wrote:
    ... when switching from american USD dollars/coins to euros. I looked up the conversions and they are just intimidating as all get out when trying to take the equivalency of euros to each dollar thats entered and then taking the rest of the USD remainders and represent that in USD coinage.Uhm, your requirement doesn't say anything about converting between USD and EUR. For starters, just write the program without any currency information at all. (That is only flavour anyways.)
    For example:
    Enter product price: 2.32
    Enter amount paid: 5.00
    Your change is 2.68
    1 x 2
    3 x 0.2
    1 x 0.05
    1 x 0.02
    1 x 0.01That deception would never fly in a Red State -- 20 cent piece? 2 cent piece? 2 dollar coin? All this smacks of Socialism!

Maybe you are looking for